Forum Discussion

SebastianBulearca's avatar
SebastianBulearca
Copper Contributor
Aug 29, 2023

How to - Bypass Stop Inherit Permissions for Sites with over 100.000 Items

Hello everyone,

I would like to start by letting you know that this is my first guide that I am writing, so bear with me.

 

I migrated a file server that we had running on-premises to SharePoint. After some time, I decided to restructure the permissions a bit and encountered a problem: I couldn't stop permission inheritance for a folder.

The issue is related to the "view threshold limitation," which is set at 100,000 items in a Document Library.

 

Microsoft Article: SharePoint limits - Service Descriptions | Microsoft Learn

Spoiler
When a list, library, or folder contains more than 100,000 items, you can't break permissions inheritance on the list, library, or folder. You also can't re-inherit permissions on it. However, you can still break inheritance on the individual items within that list, library, or folder, up to the maximum number of unique permissions in the list or library (see the next section). 

I tried several PowerShell scripts, but unfortunately, I couldn't manage to break the inheritance.

I came across a workaround from Fromelard , but, at least in my case, it was time-consuming.

I noticed that the limitation applied to each document library, not the entire site, and that gave me an idea.

My solution:

  1. Create a new Document Library inside the same SharePoint site where you want to stop permission inheritance. You can name it whatever you like, let's say "Temporary."

    Warning: It's essential to create the new library within the same SharePoint site otherwise, this process will take a long time.

  2. Examine your Document Library to identify folders with a large number of items. Choose a few of them and move them to the newly created Document Library.

  3. Afterward, go back to the Library settings and check how many items are in the Library. If it still has over 100,000 items, repeat the second step until you have fewer than 100,000 items in your Library.
  4. Now that you have fewer than 100,000 items in that library, you can stop permission inheritance.

  5. Finally, go to the library you created in the beginning and move the folders back to their original place. After that you can delete the temporarly created library.

Tip: Sometimes, you might encounter a visual bug where the folder appears to still be in the process of moving to the other library. You can test this by checking under Library settings if the item count has change after 1 Minute. If not then you can refresh the page and continue.

 

 

  • aaaaaaaa42's avatar
    aaaaaaaa42
    Copper Contributor

    SebastianBulearca I discovered an even simpler and faster method. Just move all the subdirectories and files to the bin.

     

    Next, break the inheritance.

     

    Finally, open the recycle bin, select all the items, and click "restore." All the files will be restored to their original locations (it took less than a minute for 200 GB of files).

     
     

Resources