Non-sense number of results on /me/drives endpoint when pagination parameters are sent

DiGiorgio, Veronica 11 Reputation points
2022-01-19T14:53:47.41+00:00

Hello,
we implemented an integration with your endpoint to list drives from Microsoft Graph APIs

This case is happening on a specific tenant and not on other tenants.

In particular, when asking for drives with "$top" less than 11 results, the API behaves returning an empty list and next token that at the end, returns the single entry

166413-image.png
166461-image.png

While, when calling the API without top, it returns directly the correct result!
166443-image.png

Can you please clarify how should we work correctly with this API without wasting resources on empty result set?

Regards,
Veronica

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,524 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Diya Ahuja 5 Reputation points
    2023-06-30T18:08:41.36+00:00

    The $top query parameter is used to limit the number of results returned in a response. When using the $top parameter, the API may return an empty result set if there are fewer results than the specified limit. To avoid this, you can either increase the limit or omit the $top parameter altogether.

    1 person found this answer helpful.
    0 comments No comments