I am working on an Azure Function App. It needs to retrieve all groups in Exchange. I am using this simple C#, .NET Core code:
GraphServiceClient graphClient;
var groups = graphClient.Groups.GetAsync().Result;
But, I only get 100 groups. How do I increase this limit to unlimited?
A lot of searching, but no luck.
2
Answers
You can make use of the
PageIterator
:You can list all the available groups using
$top
query parameter.$top
parameter, you can customize the result size.@odata.nextLink
property to list the remaining groups.Below is my code Snippet:
@odatanextlink
as shown below:References: