Microsoft Graph API /sharedWithMe endpoint hard limit of 500 items with no pagination

Bruno Pilosta 15 Reputation points
2025-02-27T07:56:58.0266667+00:00

We are experiencing what appears to be a hard limit of 500 items when using the /me/drive/sharedWithMe endpoint in Microsoft Graph API. Despite having more than 500 files shared with me, the endpoint consistently returns only 500 items maximum and does not include an @odata.nextLink property for pagination. I have accepted “Files.ReadWrite.All” and “Sites.ReadWrite.All” scopes.

Details:

  • Endpoint: https://graph.microsoft.com/v1.0/me/drive/sharedWithMe
  • Expected behavior: Either return all shared files or provide @odata.nextLink for pagination
  • Actual behavior: Returns max 500 files with no pagination link
  • I've tried:
    • Using $top parameter with small values
    • Different sorting options
    • Adding ?allowExternal=true
    • Sending request through Graph Explorer and over Rest API

Is there a documented limit to this endpoint? If so, what's the recommended approach to retrieve all files shared with a user when they exceed 500 items?

Thank you for your assistance.

Microsoft Security Microsoft Graph
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Saranya Madhu-MSFT 2,375 Reputation points Microsoft External Staff
    2025-02-28T05:27:47.8233333+00:00

    Hi Bruno Pilosta,

    Thanks for reaching out to Microsoft!

    Upon reviewing the official documentation, I did not find any mention of a limit for pagination and supported query parameters.

    Try using the $top parameter with the highest value to check if it returns more items.

    To clarify this issue and seek a resolution, I recommend you raise a support case with Microsoft Graph, a Support Engineer will be able to look into this issue and assist you better. You can raise support ticket from New support request - Microsoft Entra admin center or https://admin.microsoft.com/#/support/requests. This will allow support team to investigate the matter further and provide guidance or a fix.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.