I need to migrate a FTP into SharePoint, its having around 40000 document in total.

Now concern is this that each document will be having unique Read permission to multiple users and O365/SharePoint Groups.

Also I am making a SPFX (react) based custom table with filter and search option. This table will fetch document from this Document library. Which will restrict the view to the user based on custom queries.

As per my understanding a document library can have 5000 maximum unique permission.

can somebody suggest on how I can achieve this unique permission on one library or is there a way if I can fetch document from multiple document library and showcase in to one SPFX table with search filter.

1 Answer 1


5000 is soft limit of custom permissions. Hard limit is 50K. REF: Look at the security scope threshoold https://learn.microsoft.com/en-us/sharepoint/install/software-boundaries-limits-2019 The article is about SP2019 but same applies for SPO (in case of security scopes)

Best practice it is to keep it below 5K, otherwise you will face performance issues

With 40K items in library you will need to think how you will query and page results (as you can only get 5K items in one fetch) and precreate list indices to allow you query over larger data set.

Best way would be to see is there any particular pattern on the document access rights. Can they be grouped in folders (then you will have only one scope on folder level rather than multiple on each document)

You can as well split into multiple libraries fetch separately and merge data set for render in SPfx.

  • @sarad- Thank you so much for these detail.. need one more understanding on it.. if I give read permission to five different users and two SharePoint group. will it be count 7 permission in total or 1 permission as it is of Read to all !
    – cjs
    Commented Nov 23, 2022 at 8:28
  • 1
    It will be one permission scope. The limit of custom permission is per item, it doesn´t matter how many permissions you have under it (well there is a limit but that is another matter). So if for one item you assign 7 different users/groups it will count as one custom permission scope. Commented Nov 23, 2022 at 10:42
  • got it. it mean one read permission (to N users) will be count one customer permission, and if I also assign Contribute Permission on the same item to the different N user count, then it will consider as 2 customer permission scope.
    – cjs
    Commented Nov 23, 2022 at 10:59
  • 1
    No, you can have any mix of read and contribute or other custom permission leves on the item and it will still count as one scope. Item either inherits from parent (library or folder) or has custom scope (and it doesn´t matter what mix of permission is the scope). Please remember to mark as answered if that covered your original question. Commented Nov 23, 2022 at 13:04
  • Thank for this detailed clarification Marek. I am currently testing this 50K limit, post it I will surely mark this as desired ans.
    – cjs
    Commented Nov 24, 2022 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.