Permission & Access Issues

Remove Unique Permissions from OneDrive for Business Files and Folders

Amos GikundaAmos Gikunda Nov 22, 2026 868 views

Question details

Remove unique permissions from multiple OneDrive for Business files and folders and restore permission inheritance.

Remove Unique Permissions from OneDrive for Business Files and Folders
Product
OneDrive for Business and SharePoint Online
Device & OS
not provided
Scenario
An administrator or authorized user needs selected OneDrive items to inherit access from their parent locations.
Observed behavior
The selected files or folders have unique permissions instead of inheriting their parent permissions.
Before you start

Identify the OneDrive site URL and the exact server-relative paths of the files and folders. Confirm that your account can manage their permissions and review the parent permissions, because resetting inheritance can grant or remove access.

Solution 1Recommended

Reset multiple items with SharePoint CSOM and PowerShell

Use this method to restore inheritance for a list of files and folders in the same OneDrive site.

PnP PowerShell provides the authenticated SharePoint client context used by the CSOM calls below. Interactive sign-in requires an appropriately configured Microsoft Entra ID app registration and client ID; your organization may need to approve its permissions.

Resetting a folder does not automatically reset separately secured items inside it. Add each such child item to the list if it should also inherit permissions.

1
Install PnP PowerShell

Open a supported version of PowerShell and run: Install-Module PnP.PowerShell -Scope CurrentUser. Follow any prompts to install the module.

2
Connect to the OneDrive site

Run Connect-PnPOnline -Url "https://contoso-my.sharepoint.com/personal/user_contoso_com" -Interactive -ClientId "YOUR-APP-CLIENT-ID". Replace the URL and client ID, then sign in with an account authorized to manage the items.

3
Reset the selected items

Replace the example paths with the exact server-relative paths of your items, then run: $ctx = Get-PnPContext $items = @( @{ Type = 'File'; Path = '/personal/user_contoso_com/Documents/report.docx' }, @{ Type = 'Folder'; Path = '/personal/user_contoso_com/Documents/Projects' } ) foreach ($entry in $items) { try { if ($entry.Type -eq 'File') { $item = $ctx.Web.GetFileByServerRelativeUrl($entry.Path).ListItemAllFields } elseif ($entry.Type -eq 'Folder') { $item = $ctx.Web.GetFolderByServerRelativeUrl($entry.Path).ListItemAllFields } else { throw 'Unsupported item type' } $item.ResetRoleInheritance() $ctx.ExecuteQuery() Write-Host "Reset: $($entry.Path)" } catch { Write-Warning "Failed: $($entry.Path) - $_" } }

4
Verify access

In OneDrive, select each item and open Manage access to check its permissions. Investigate any paths reported as failed before rerunning them.

Reset multiple items with SharePoint CSOM and PowerShell
Access can change: After the reset, access follows the parent location. Users may still have access through inherited permissions, so resetting inheritance is not a guarantee that all access has been revoked.
Free Microsoft Office alternative

Work with Office files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents. Its format compatibility helps you move your files into WPS for editing, while OneDrive permission changes remain a Microsoft administration task.

Open and edit documents after reviewing their OneDrive accessSupports Microsoft Office formats including DOCX, XLSX, and PPTXFamiliar document, spreadsheet, and presentation toolsFree and lightweight for everyday office work
microsoft office alternative - wps office

Frequently Asked Questions

What happens when I delete unique permissions?

The item inherits permissions from its parent folder or library instead of using its own unique permissions. Check Manage access afterward because users may gain or lose access.

Will resetting a folder also reset permissions on every file inside it?

No. Files and subfolders with their own unique permissions retain them. Include those items separately in the PowerShell list if they should inherit access.

Why can't I see Delete unique permissions?

The item may already inherit permissions, or your account may not have permission to manage access. Open Manage access, choose Advanced, and check with your SharePoint administrator if needed.

Do I need to put an administrator password in the script?

No. Use Connect-PnPOnline with interactive sign-in and a configured app client ID. Do not store administrator passwords in plain text.