Remove Unique Permissions from OneDrive for Business Files and Folders
Question details
Remove unique permissions from multiple OneDrive for Business files and folders and restore permission inheritance.

- 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.
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.
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.
Open a supported version of PowerShell and run: Install-Module PnP.PowerShell -Scope CurrentUser. Follow any prompts to install the module.
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.
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) - $_" } }
In OneDrive, select each item and open Manage access to check its permissions. Investigate any paths reported as failed before rerunning them.

Remove unique permissions for an individual item in OneDrive
Use the web interface when you only need to change a small number of items.
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.

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.




