Hello @linux-user ,
Thank you for contacting Microsoft Azure QnA platform. I would like to confirm that most of the Graph API use the concept called pagination to manage the retrieval of large data sets. Same is the case with Directory Role API.
List Directory Roles operation does not support the $top query parameter for pagination. Instead, it returns a default set of objects. At times the page length is defaulted to 999 items, This means that if there are more than 999 items, the API will return the first 1,000 roles in the initial response.
If there are more roles to retrieve, the API includes an @odata.nextLink
property in the response. This property contains a URL that you can use to retrieve the next page of results3. You should include the entire URL in the @odata.nextLink
property in your request for the next page of results. More details about paging and @odata.nextLink
property can be found on following document: https://learn.microsoft.com/en-us/graph/best-practices-concept#pagination
The @odata.nextLink URL value contains a $skiptoken query parameter. The $skiptoken is an opaque value that points to the next page of results. You should not try to extract the $skiptoken value and use it in a different request.
Please note that the behavior of APIs can vary, and it’s always a good idea to refer to the specific API documentation for the most accurate and up-to-date information. In this case, you may refer to the Microsoft Graph documentation for more details.
I hope this answer helps to resolve your issue. Please "Accept the answer" if the information helped you. This will help us and others in the community as well.