How to Remove a User from All OneDrive and SharePoint Access
Question details
The user needs to completely remove a specific user from all personal OneDrive and SharePoint locations across a Microsoft 365 tenant.

- Product
- Microsoft 365 (OneDrive and SharePoint)
- Device & OS
- not provided
- Scenario
- Tenant-wide user permission management and access revocation
- Observed behavior
- The standard out-of-the-box Microsoft 365 interface does not provide a direct, generalized feature to remove a user from every OneDrive and SharePoint location simultaneously.
Ensure you have Global Administrator or SharePoint Administrator privileges in your Microsoft 365 tenant before attempting tenant-wide permission modifications.
Use a Custom PowerShell Script for Tenant-Wide Removal
Since the standard interface lacks a bulk removal tool, utilizing a custom PowerShell script is the recommended method to revoke access across all tenant sites.
Removing a user from every SharePoint site and personal OneDrive location simultaneously requires administrative automation. You can achieve this using the SharePoint Online Management Shell or the PnP PowerShell module to iterate through all site collections.
Launch Windows PowerShell on your machine with administrative privileges by right-clicking the icon and selecting 'Run as administrator'.
Use the Connect-SPOService cmdlet to connect to your tenant's admin center (e.g., Connect-SPOService -Url https://[yourtenant]-admin.sharepoint.com).
Run a custom script designed to loop through all OneDrive URLs and SharePoint site collections, utilizing the Remove-SPOUser cmdlet to revoke the specific user's permissions.
If you do not have a script prepared, visit the Microsoft Q&A forum with the 'SharePoint Development' tag or the SharePoint Developer Tech Community to find pre-written, vetted scripts for this exact purpose.

Experience a Lightweight and Hassle-Free Office Suite with WPS Office
While managing tenant-wide permissions in Microsoft 365 can be complex and require administrative scripting, creating and managing your daily documents shouldn't be. WPS Office offers a free, lightweight alternative that allows you to focus on your work without the overhead of enterprise tenant administration.
- 1. Visit the WPS Website: Go to the official WPS Office website on your computer.
- 2. Download the Installer: Click the 'Free Download' button to get the correct version for your operating system.
- 3. Install and Launch: Run the downloaded installer, follow the on-screen prompts, and start creating documents immediately.

Frequently Asked Questions
Can I remove a user from all SharePoint sites using the Microsoft 365 Admin Center UI?
No, the standard Microsoft 365 Admin Center interface does not currently offer a one-click option to remove a user from all SharePoint sites and personal OneDrives simultaneously. Administrative automation via PowerShell is required.
What administrator roles are required to run these PowerShell scripts?
You must be assigned the SharePoint Administrator or Global Administrator role in Microsoft 365 to run scripts that view and modify permissions across all tenant site collections and OneDrive locations.
Is there a risk of deleting user data when removing their access?
Removing a user's access only revokes their permission to view or edit the files. It does not delete the underlying files, folders, or site collections in SharePoint or OneDrive.
Where can I find safe PowerShell scripts for Microsoft 365 tenant administration?
You can find robust, community-vetted scripts in the Microsoft Tech Community, Microsoft Q&A forums under the SharePoint Development tag, or the official Microsoft learn documentation.




