A Microsoft file hosting and synchronization service.
Hi @Sauravsetia,
Welcome to Microsoft Q&A, and thank you for reaching out to us.
Based on your description, as I checked, according to Microsoft’s official documentation, OneDrive for Business and SharePoint Online enforce a strict limit on the number of items in a document library that can have unique permissions. The maximum limit is 50,000 unique permission scopes, while the recommended operational limit is 5,000 for best performance.
Creating an anonymous (“Anyone with the link”) sharing link breaks permission inheritance, causing the item to receive its own unique permission scope. As more items accumulate their own scopes, the library approaches this limit.
This behavior suggests the error you see is not a Microsoft Graph API limitation. It is a SharePoint Online platform-level restriction, and Graph merely surfaces the underlying SharePoint error. For large libraries, Microsoft recommends keeping unique permissions to an absolute minimum unless required by a specific business scenario.
For workarounds, using folder‑level sharing that Q&A assist suggest is the best place to start. When you share at the folder level, inheritance is broken only once, meaning the folder creates a single unique scope while all files inside continue to inherit its permissions. This prevents additional unique permission scopes from being created each time you need to share something.
If your library has already accumulated too many unique scopes, you may also consider creating a new OneDrive or SharePoint site and distributing your content across multiple libraries to avoid hitting the limit again.
Another option is to use the Download URL provided by Microsoft Graph. Since this URL is temporary and doesn’t modify permissions, it avoids generating new unique scopes entirely, though it may not be appropriate if you need a persistent public link.
For more details, you can refer to this Microsoft documentation here. There is also a helpful Stack Overflow thread explanation that breaks the concept down in simpler terms.
This link will take you to StackOverFlow, which is outside Microsoft’s domain. Please note that Microsoft is not responsible for the accuracy, security, or advertising on external sites.
I hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.