Ask Your Question
3

How does pagination work in the "groups" feature of SDK v5 in ms.Graph?

asked 2023-06-11 00:29:25 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-06-11 00:58:02 +0000

woof gravatar image

In the "groups" feature of SDK v5 in ms.Graph, pagination works through the use of the OData $top and $skip query parameters.

When working with a large number of groups, the API will return a maximum of 100 groups per request. To retrieve additional groups, use the $skip parameter to skip the first N records, and the $top parameter to specify how many records to return in the next request.

For example, to retrieve the first 100 groups, you can make a GET request to the following endpoint:

https://graph.microsoft.com/v1.0/groups?$top=100

To retrieve the next 100 groups, you can make a GET request to the same endpoint, with the $skip parameter:

https://graph.microsoft.com/v1.0/groups?$top=100&$skip=100

You can continue to use the $skip parameter to retrieve additional pages of results, until you have retrieved all the groups you need.

Note: Be cautious when using the $skip parameter, as it can be slow and resource-intensive for large datasets. It is recommended to use pagination along with filtering and sorting to optimize performance.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-11 00:29:25 +0000

Seen: 18 times

Last updated: Jun 11 '23