How to limit graph api results?

nabi04 56 Reputation points
2021-04-06T11:15:16.127+00:00

Hi, I have an application with 100+ users and groups assigned to it in Azure AD. When I try to retrieve the app details using azure ad graph api, there's an error timeout which means I didn't retrieved the app details.

Is there a way to limit the number of results that the graph api will send back to me so it won't cause an overload issue on my app?

I have heard of Pagination. Is that available on azure ad graph api? And how will I use it?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,389 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jesse Corbin 126 Reputation points
    2021-04-07T14:57:17.623+00:00

    Hi @nabi04 !

    If you are using the Graph Explorer you can use "?$top=x" where x is the number of objects you want to show.

    You can find more information here: https://learn.microsoft.com/en-us/graph/paging?context=graph%2Fapi%2F1.0&view=graph-rest-1.0

    Hope this helps!