← TenantTools365Blogone .sppkg · seven tools
Inheritance365 + Unlock365 · How-to

Reset permission inheritance on every subfolder at once (and keep the exceptions you actually want)

The UI resets one folder at a time and nothing below it. PowerShell can do a whole tree — but it will also flatten the two folders that were broken on purpose. Here is the script with an exclusion list, and the 100,000-item wall.

Published 2026-09-11 · by HS Services

"Delete unique permissions" in the browser is one folder, and the dialog's fine print is accurate: subfolders that have their own permissions keep them. On a library with hundreds of broken folders it is a week of clicking. PowerShell does the tree in minutes — which is exactly the problem, because two of those folders are broken on purpose.

Step 1: inventory, not action

Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/Projects -Interactive
$lib = 'Documents'

$broken = Get-PnPListItem -List $lib -PageSize 2000 -Fields FileRef,FileLeafRef |
  Where-Object { Get-PnPProperty -ClientObject $_ -Property HasUniqueRoleAssignments } |
  Select-Object Id, @{n='Type';e={$_.FileSystemObjectType}}, @{n='Path';e={$_['FileRef']}}

"$($broken.Count) items with unique permissions"
$broken | Export-Csv .\broken-inheritance.csv -NoTypeInformation

This is one call per item, so on a 50,000-item library expect it to run for a while. It is also the list you send to the owner. Ask them one question: which of these are supposed to be different? Those go in the exclusion list.

Step 2: know who loses access

Before resetting anything, run the who-loses-access comparison over the list. Guests and shared-with users on those folders lose access the moment you reset; the owner should see those names first.

Step 3: reset

One folder at a time, the command is:

Set-PnPFolderPermission -List $lib -Identity 'Client X' -InheritPermissions

Looping it over the inventory is a two-line change. Looping it safely is not: you need the exclusion list applied as a path prefix so a confidential folder's subfolders are protected too, you need each item's who-loses-access list exported before the loop runs, and you need to notice when a reset silently fails on a checked-out or locked item, because the loop will not stop on its own. That is the 80% / 20% line for this job.

Step 4: verify

Re-run the inventory. The count should equal the number of kept items. Anything still showing unique permissions was checked out, locked, or failed silently.

The 100,000-item wall

Lists and libraries over 100,000 items cannot break or re-inherit permissions at the list level. Item-level resets still work. If you hit it, do not try the library setting; work through folders. The Tech Community thread on this ends with the same conclusion: below the threshold by splitting or archiving, or accept per-folder operations.

Doing this with a safety catch

The three failure modes are: resetting a folder that was broken on purpose, resetting before anyone saw who loses access, and not noticing when a reset silently failed. Inheritance365 addresses each: an exclusion list you build from the sweep results, a per-item impact simulation that must be exported before the execute button enables, and a post-write check on every item it resets. It only ever calls resetroleinheritance; it never grants or removes anything else.

Questions people also ask

Does deleting unique permissions on a folder reset its subfolders?

No. Each item with broken inheritance is reset individually. Resetting a parent folder does not touch children that have their own unique permissions.

How do I reset permissions on all folders in a SharePoint library?

Enumerate items with HasUniqueRoleAssignments true and call reset on each (Set-PnPFolderPermission / Set-PnPListItemPermission -InheritPermissions in PnP PowerShell). Exclude the items that should keep unique permissions before running it.

Why can't I break or reset inheritance on a large SharePoint list?

Lists and libraries with more than 100,000 items cannot have inheritance broken or re-inherited at the list level. Item-level resets still work; reduce the item count or reset per folder.

How do I find all folders with unique permissions in SharePoint?

Library settings → Permissions → Show items with unique permissions lists them for one library. PowerShell can walk every item across all libraries and report HasUniqueRoleAssignments.