Skip to content

Conversation

@timayabi2020
Copy link
Contributor

The default page size has been set to the maximum value (999) as defined by the constant variable "MaxPageSize" whenever the argument "All" is provided. E.g.

Get-MgServiceAnnouncementMessage -All -CountVariable 'ServiceAnnouncementMessageCount' -Debug

This is supposed to address issues #1141 and #1224.
The screenshot shows the result of this fix. i.e., odata.nextLink parameter which was not there before as per the customer complaint, is now available.
image

…sed the default 100 items returned when the argument "-All" is provided
@peombwa
Copy link
Member

peombwa commented May 2, 2022

@timayabi2020, please test the approach of setting the pageSize to 999 with other workloads. Each workload has a different paging strategy. For example, in AzureAD (users, groups, devices, etc.), the default is page size 100 and max 999. In Outlook, the default page size is 10, and the max is a black box.

  • Different APIs might have different default and maximum page sizes.
  • Different APIs might behave differently if you specify a page size (via the $top query parameter) that exceeds the maximum page size for that API. Depending on the API, the requested page size might be ignored, it might default to the maximum page size for that API, or Microsoft Graph might return an error.

See https://docs.microsoft.com/en-us/graph/paging?view=graph-rest-1.0

@peombwa
Copy link
Member

peombwa commented May 10, 2022

@timayabi2020, the implementation will not work for some Team's commands/APIs such as Get-MgChat -All -PageSize 999. See #1248 for more details.

@peombwa
Copy link
Member

peombwa commented Jun 20, 2022

@timayabi2020, can we close this PR. The proposed fix won't work for all APIs. We should look at using a workload's default page size.

@peombwa
Copy link
Member

peombwa commented Jul 1, 2022

Will be fixed by #1361.

@peombwa peombwa closed this Jul 1, 2022
@peombwa peombwa deleted the Bug_fix-_for_ServiceAnnouncementMessage branch July 1, 2022 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants