Hello Dmitrii V,
You are correct that the Prefer: odata.maxpagesize
header is supported by the Microsoft Graph contact/delta
API; however, the official documentation does not provide a precise limit for this parameter.
The odata.maxpagesize
maximum value is:
- 200 for objects, such as users and contacts
- 500 for directory link objects (group members, for example).
And the same number is returned if odata.maxpagesize
is not set.
Even if a higher value is specified, the API will cap the page size to these limits.
Sometimes, an internal timeout threshold is also applied by the API. Even if there are more contacts available, the server may return fewer than 200 contacts if it is unable to gather and return the entire page of results in that amount of time.
- Different requests may return a different number of results.
- The presence of a
**@odata.nextLink
** in the response indicates there are more pages to fetch.
To ensure correct and reliable data handling, set the header as Prefer: odata.maxpagesize=200
Hope this helps.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful, which may help members with similar questions.
If you have any other questions or are still experiencing issues, feel free to ask in the "comments" section, and I'd be happy to help.