ADD Get-EntraUser -PageSize parameter
Describe the feature
Add the "Pagesize" parameter to increase the result limit for pagination, for Graph is 999 elements
How will this feature enhance your project and further the project’s overall goals? Who will benefit from this feature (i.e. all users; the project team)?
This change would make retrieving all user objects much faster, and throttling should not be a big deal if your tenant has 10k+ users. So this would be beneficial for all users.
Describe alternatives you've considered Still use Get-MGuser -Pagesize 999 -all
Additional context None
@HCRitter Thanks for raising the issue, We are looking into it.
related to https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2769 ?
It's kinda related, as -all should be by default 999 in page size. But also for -top the user should be able to specify the -pagesize parameter, to fit the needs :)
yeah, theoretically they should be aliases... @peombwa can you please chime in and explain why they are different? You wrote this PR: https://github.com/microsoftgraph/msgraph-sdk-powershell/pull/1541
The -All, -Top, and -PageSize parameters all influence the size and structure of the output when querying data. However, if you're using aliases or simplified command forms, their behavior may not always apply consistently. When -PageSize is specified, the command may make multiple network calls to retrieve data in chunks (pages), continuing until it reaches the limit defined by either -Top or -All, depending on which is used.
An example would be:
Get-EntraUser -All -PageSize 50
If I have 70 users, 2 calls will be made to retrieve the full dataset with the first returning 50 and next returning 20 for the total of 70.
If I use -Top for the same tenant with 70 users for instance:
Get-EntraUser -Top 40 -PageSize 15
I should get 3 network calls made of 15, 15, 10 which would retrieve upto 40 results only.