question

user0808 avatar image
0 Votes"
user0808 asked JamesTran-MSFT commented

How to limit graph api results?

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?

azure-active-directory
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@user0808
Thank you for your post!

  • When you retrieve your app details, can you share the specific Graph API call you are using?

  • Can you share the full error message or timeout message that you're getting?


Any additional information would be greatly appreciated.

If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.

0 Votes 0 ·

1 Answer

JesseCorbin-6590 avatar image
0 Votes"
JesseCorbin-6590 answered JamesTran-MSFT commented

Hi @user0808 !

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://docs.microsoft.com/en-us/graph/paging?context=graph%2Fapi%2F1.0&view=graph-rest-1.0

Hope this helps!

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@user0808
I just wanted to check in and see if you had any other questions or if you were able to resolve this issue?

0 Votes 0 ·

Can pagination be also applied in Azure AD graph api?

0 Votes 0 ·

@user0808
Thank you for your response!

Pagination should work with AzureAD Graph API too, depending on the API you're using. If you'd like, you can Google the API you intend on using and see if OData query options is supported for that or not.


If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.

0 Votes 0 ·