Fix Remove-SPOSite Access Denied Error in SharePoint PowerShell
Question details
The user is unable to delete a SharePoint Online site using the Remove-SPOSite PowerShell command due to an "Access is denied" (0x80070005) error, despite having Global Administrator privileges.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Attempting to delete a SharePoint Online site using the SharePoint Online Management Shell across multiple tenants.
- Observed behavior
- The command continuously returns an "Access is denied, error 0x80070005" message, even when executed by a Global Admin in an elevated PowerShell session.
Ensure you are running the latest version of the SharePoint Online Management Shell and that your Microsoft 365 account has active Global Administrator or SharePoint Administrator roles assigned.
Verify Management Shell and Update Permissions
Ensure you are using the correct management shell and have the latest module version installed to prevent authentication bugs.
Sometimes, running standard PowerShell or the ISE is not sufficient for SharePoint administrative tasks, or an outdated module might fail to recognize elevated privileges.
Search for SharePoint Online Management Shell in your Start menu, right-click it, and select 'Run as administrator' to ensure the session is fully elevated.
Type 'Update-Module -Name Microsoft.Online.SharePoint.PowerShell' and press Enter to ensure you are running the most recent version of the module.
Execute 'Connect-SPOService -Url https://[yourtenant]-admin.sharepoint.com' and log in with your Global Admin credentials.
Run 'Remove-SPOSite -Identity [SiteURL]' again to see if the access denied error is resolved.

Escalate to Microsoft Q&A Communities
If the error persists despite correct permissions, escalate the issue to specialized Microsoft PowerShell engineers.
Need a Lightweight Alternative for Daily Office Tasks?
While SharePoint administrative tasks require Microsoft's specific PowerShell modules, handling your daily document, spreadsheet, and presentation tasks doesn't have to be complicated or expensive. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install the Software: Run the downloaded setup file and follow the straightforward on-screen instructions.
- 3. Start Creating: Open WPS Office to instantly begin editing your existing documents, spreadsheets, and presentations.

Frequently Asked Questions
Why do I get an access denied error in PowerShell even as a Global Admin?
This can happen if the SharePoint Online Management Shell is outdated, if the PowerShell session is not properly elevated (Run as administrator), or if there are backend tenant synchronization issues preventing the system from recognizing your admin role.
Can I delete a SharePoint site from the Admin Center instead of using PowerShell?
Yes, you can bypass PowerShell entirely by navigating to the SharePoint admin center, going to 'Active sites', selecting the site you want to remove, and clicking 'Delete' from the command bar.
How do I properly elevate my PowerShell session for SharePoint administration?
Locate the PowerShell or SharePoint Online Management Shell icon in your system, right-click it, and select 'Run as administrator' before executing the Connect-SPOService command.




