Maximum search results?

Anne Admin 1 Reputation point
2023-08-28T23:52:07.67+00:00

I am setting the From parameter in my search to go through all results, but when I get to 1000 results I get an error that "BadRequestThe maximum allowed page size is 1000"

How do I page past 1000 items?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
2,093 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Manu Philip 16,566 Reputation points MVP
    2023-08-29T01:55:07.7233333+00:00

    The simple way to get pages of results is to use $top query parameter

    For example, the following URL requests all the users in an organization with a page size of 5, specified with the $top query parameter:

    https://graph.microsoft.com/v1.0/users?$top=5

    More details can be found in the following reference

    https://learn.microsoft.com/en-us/graph/paging


    --please don't forget to upvote and Accept as answer if the reply is helpful--