Oct 13 2020 05:00 PM
When we are starting to convert our users from File Servers to SharePoint Online, the content loading into Document Libraries start to be complex.
Permission Manage is one of the biggest challenge, especially with the limitation implemented by Microsoft to protect their platform:
Into this limitation, one important part is:
Many folders from File Servers have much more than 100'000 items (files+folders) and you can forget to pre-configure your document library before run the file import process.
If you are face to this situation you will have the following when you are going in "Library Settings"
Going in Permission part of this settings:
When you are clicking on "Stop inheriting permissions", you will have that error message:
At this stage, we have no solution available and the text specifying the Administrator threshold is not pointing your company Administrator, but directly Microsoft. So there is no way to change that value.
But, there is a "Tip" to use if you know well the content you loaded (like using TreeSize or an equivalent). Because you can look into the original folder (from file server) what are the biggest sub-folders (with less than 50'000 items).
In this case, the first 3 folders are containing more than 20'000 items, helping me to have less than this limitation:
So the solution is to go into your Document Library and select the specific folders one by one to delete it (or select many if you are sure to have less than 50'000 items as total):
When the deletion is completed, you can go in your Site Recycle Bin to control the presence of those deleted folders:
You can now go back into your Library Settings and control you have less than the limitation imposed by Microsoft:
You can now click on "Permissions" management link to disable the Permission inheritance on that Document Library:
When the permission set is correctly configured, you can go into the Recycle Bin, select your deleted folders and click on "Restore"
After a couple of minutes, you can come back into the library settings and review the Item Total number:
Your situation is now fixed and you can focus on the next problem.
Fabrice Romelard
Apr 25 2023 08:41 AM
This worked for me but restoring is terrible. I had to select some 20'000 folders just hoping that I did not miss something..
Nov 06 2023 04:55 AM
@Eleric0 For me, the following cmdlet worked:
$deleteditems = Get-PnPRecycleBinItem -RowLimit 500000 | Where{($_.DirName -like "teams/teamName/libraryName*") -and ($_.DeletedByEmail -eq "email address removed for privacy reasons") -and ($_.DeletedDateLocalFormatted -like "11/6/2023*")} | Restore-PnPRecycleBinItem -Force
Also, see - SharePoint Online: Restore a Document from the Recycle Bin using PowerShell - SharePoint Diary