Permission & Access Issues

Fix Remove-SPOSite Access Denied Error in SharePoint PowerShell

Huda QurayshiHuda Qurayshi Nov 4, 2026 868 views

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.

How to Fix Remove-SPOSite Access Denied Error in PowerShell
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.
Before you start

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.

Solution 1Recommended

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.

1
Open SharePoint Online Management Shell

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.

2
Update the PowerShell Module

Type 'Update-Module -Name Microsoft.Online.SharePoint.PowerShell' and press Enter to ensure you are running the most recent version of the module.

3
Reconnect to the Admin Center

Execute 'Connect-SPOService -Url https://[yourtenant]-admin.sharepoint.com' and log in with your Global Admin credentials.

4
Retry the Command

Run 'Remove-SPOSite -Identity [SiteURL]' again to see if the access denied error is resolved.

Verify Management Shell and Update Permissions
Check Tenant Scope: Ensure that the account you are using has administrative rights specifically for the tenant where the target SharePoint site resides.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install the Software: Run the downloaded setup file and follow the straightforward on-screen instructions.
  3. 3. Start Creating: Open WPS Office to instantly begin editing your existing documents, spreadsheets, and presentations.
Highly compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Lightweight installation with incredibly fast startup times.Familiar user interface requiring almost zero learning curve.Seamless migration of your existing office documents and local files.
microsoft office alternative - wps office

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.