How to Fix Unique Permissions Reappear After You Reset a Library
🔍 WiseChecker

How to Fix Unique Permissions Reappear After You Reset a Library

You reset a SharePoint library to inherit permissions from its parent site, but the library shows unique permissions again within minutes or hours. This problem occurs when items in the library, such as folders or files, have their own permission breaks that are not removed during the reset. This article explains why this happens and provides a complete fix to permanently remove unique permissions from all items in the library.

Key Takeaways: Resetting Library Permissions Permanently

  • Library Settings > Permissions for this document library: Shows the current inheritance status of the library itself.
  • Item-level permission breaks: Individual files or folders with unique permissions cause the library to report unique permissions after a reset.
  • PowerShell script to remove all unique permissions: The only reliable method to clear broken permissions on every item in a library.

ADVERTISEMENT

Why Unique Permissions Reappear After Resetting a Library

When you reset a library to inherit permissions from its parent site, SharePoint removes the permission break only from the library root. Any files, folders, or subfolders inside the library that had their own unique permissions remain broken. SharePoint then reports the library as having unique permissions because those child items still exist with broken inheritance.

This condition happens most often when users or automated processes have previously set unique permissions on individual items. The library reset operation does not cascade down to child objects. To fully resolve this, you must remove permission breaks from every item within the library.

How Permission Inheritance Works in SharePoint

SharePoint uses a hierarchical permission model. The site collection root has a set of permissions. By default, every site, library, folder, and file inherits permissions from the level above. When you break inheritance on a library, you can assign unique permissions to that library only. If you then break inheritance on a file inside the library, that file has its own permissions separate from the library. Resetting the library to inherit from the site does not automatically fix the broken inheritance on that file.

Steps to Permanently Remove Unique Permissions from a Library

To fix the problem completely, you must remove permission breaks from every item inside the library. Use one of the following methods.

Method 1: Use SharePoint PowerShell to Reset All Item Permissions

  1. Install and connect SharePoint Online Management Shell
    Open Windows PowerShell as an administrator. Run Install-Module -Name Microsoft.Online.SharePoint.PowerShell if the module is not installed. Then run Connect-SPOService -Url https://yourtenant-admin.sharepoint.com and sign in with a SharePoint admin account.
  2. Get the site and library URL
    Identify the site URL (for example, https://yourtenant.sharepoint.com/sites/sales) and the library name (for example, Shared Documents).
  3. Run the PowerShell script to reset all item permissions
    Paste and run the following script, replacing the site URL and library name with your own values:
    $siteUrl = "https://yourtenant.sharepoint.com/sites/sales"
    $libraryName = "Shared Documents"
    $web = Get-SPOSite $siteUrl | Get-SPOWeb
    $list = $web.Lists[$libraryName]
    foreach ($item in $list.Items) {
    if ($item.HasUniqueRoleAssignments) {
    $item.ResetRoleInheritance()
    $item.Update()
    }
    }
    Write-Host "Done"
  4. Verify the library inheritance status
    Go to the library in SharePoint. Click the gear icon and select Library settings. Under Permissions and Management, click Permissions for this document library. The page should show that this library inherits permissions from its parent site.

Method 2: Use SharePoint Designer to Reset Permissions in Bulk

  1. Open the site in SharePoint Designer 2013
    Launch SharePoint Designer 2013 and open the site that contains the library.
  2. Navigate to the library
    In the left navigation, click Lists and Libraries. Select the library that has the permission issue.
  3. Edit the list item permissions
    Click List Settings. Under Permissions and Management, click Permissions for this document library. If the library shows unique permissions, click Inherit Permissions. This resets the library root. Then click All Items to view all items. Select all items, right-click, and choose Reset Role Inheritance. This removes unique permissions from every selected item.
  4. Save and verify
    Save the changes. Refresh the library permissions page to confirm that inheritance shows Inherited from parent.

Method 3: Manual Reset for Small Libraries

  1. Open the library and switch to classic view
    In the library, click the gear icon and select Library settings. Under Permissions and Management, click Permissions for this document library. If the library shows unique permissions, click Inherit Permissions.
  2. Check each folder and file
    Browse through every folder and subfolder in the library. For each item, click the ellipsis (three dots) and select Manage access. If the item shows a link that says Stop inheriting permissions, it currently inherits. If it shows a link that says Inherit permissions, click it to reset the item to inherit from the library.
  3. Repeat for all items
    Manually reset every item that has broken inheritance. This method is only practical for libraries with fewer than 20 items.

ADVERTISEMENT

If Unique Permissions Still Reappear After the Main Fix

SharePoint Library Shows Unique Permissions After PowerShell Script

If the PowerShell script runs without errors but the library still shows unique permissions, one or more items may have been missed. The script above only processes items in the root of the library, not items inside subfolders. To fix this, modify the script to iterate through all folders recursively:

  1. Use a recursive PowerShell script
    Run the following script that processes all items in all subfolders:
    function Reset-AllItems($folder) {
    foreach ($item in $folder.Items) {
    if ($item.HasUniqueRoleAssignments) {
    $item.ResetRoleInheritance()
    $item.Update()
    }
    }
    foreach ($subFolder in $folder.SubFolders) {
    Reset-AllItems($subFolder)
    }
    }
    $rootFolder = $list.RootFolder
    Reset-AllItems($rootFolder)

Unique Permissions Return After a User Moves a File with Broken Permissions

When a user moves a file from another library or site into the reset library, that file may carry its own unique permissions. The library then shows unique permissions again. To prevent this, train users to copy files instead of moving them. Alternatively, run the recursive PowerShell script weekly to clean up any new broken items.

Permissions Reset Does Not Work for Large Libraries

SharePoint Online has a resource throttle that limits how many items you can update in a single script run. For libraries with more than 5,000 items, run the script in batches of 1,000 items. Add a pause between batches using Start-Sleep -Seconds 5.

Manual Reset vs PowerShell Reset: Key Differences

Item Manual Reset (SharePoint UI) PowerShell Reset
Scope Library root only All items including subfolders
Time required Minutes for small libraries Minutes for large libraries
Error handling Manual check each item Automatic skip of items without broken permissions
Requires SharePoint admin rights No Yes
Can handle 5,000+ items No Yes, with batching

After completing the reset, verify the library inheritance by going to Library settings > Permissions for this document library. The page should show This document library inherits permissions from its parent site. If you need to prevent future breaks, consider creating a site collection permission policy that restricts users from breaking permission inheritance on items below the library level.

ADVERTISEMENT