-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-All parameter should automatically set -PageSize=999 #2769
Comments
Good idea! |
@Licantrop0 Why have you mentioned the $top parameter when the -PageSize is responsible for the page size? |
because |
@petrhollayms, I discovered that this was asked already a while ago and it breaks some scenarios, see: #1230 and: #1248, maybe we should reconsider this. |
@Licantrop0 If -Top is used without the -Pagesize, -Top sets the $top. -PageSize cannot be greater than 999. However, -Top can be greater than 999, and command like It's possible to specify -Top and -All at the same time, but I don't understand why would you do that. -Top and -All should be in different parameter sets, right? |
@peombwa wrote that code and he would be the best explaining the behavior. |
When listing all items, it's much more efficient to query the maximum Microsoft Graph PageSize, 999 items (
$top
parameter), instead of the default 20.The
-All
queries could be up to 50 times faster, as it reduces roundtrips using@odata.nextLink
.If a query has
-All
parameter, it should automatically set-PageSize 999
if not otherwise specified in the query.The text was updated successfully, but these errors were encountered: