A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
A SharePoint Online site is permanently removed only after Remove-SPOSite moves it to Deleted sites and Remove-SPODeletedSite purges it; because this site never reaches Deleted sites and later returns as active, first verify whether it is group-connected and whether the script completed both distinct operations.
1. Verify the deletion state and site type
Do not rerun the same script yet. Review its output and determine whether it ran:
-
Remove-SPOSiteagainst the active site. -
Remove-SPODeletedSiteonly after the site appeared in the deleted-site collection.
Remove-SPOSite does not permanently delete a site; it sends it to the SharePoint Online Recycle Bin. Permanent deletion is a separate operation using Remove-SPODeletedSite.^1^
Use the SharePoint Online Management Shell to inspect both states:
Connect-SPOService -Url https://contoso-admin.sharepoint.com
$siteUrl = "https://contoso.sharepoint.com/sites/sitetoremove"
Get-SPOSite -Identity $siteUrl -ErrorAction SilentlyContinue
Get-SPODeletedSite -Identity $siteUrl -ErrorAction SilentlyContinue
Expected results:
- Returned by
Get-SPOSite: still active, so it cannot yet be purged withRemove-SPODeletedSite. - Returned by
Get-SPODeletedSite: delete it permanently:
Remove-SPODeletedSite -Identity $siteUrl -Confirm:$false
That cmdlet requires at least the SharePoint Administrator role and permanently removes the deleted site from the Recycle Bin.^2^
2. If it is connected to a Microsoft 365 group
A group-connected team site has a separate Microsoft 365 group lifecycle. Deleting it from SharePoint admin center → Active sites also deletes the associated group resources, including its mailbox, calendar, and Teams channels. Permanently deleting a group-connected site must be done through PowerShell.^3^
If permanent deletion reports:
This site can't be permanently deleted because it's connected to a Microsoft 365 group.
use Remove-SPODeletedSite from the latest SharePoint Online Management Shell. If the associated group no longer exists in Microsoft Entra ID or Deleted groups, but SharePoint still reports the connection, clear the orphaned group ID and repeat the normal two-stage deletion:^4^
$siteUrl = "https://contoso.sharepoint.com/sites/sitetoremove"
Set-SPOSite -Identity $siteUrl -ClearGroupId
Remove-SPOSite -Identity $siteUrl -Confirm:$false
# Run after Get-SPODeletedSite returns the site:
Remove-SPODeletedSite -Identity $siteUrl -Confirm:$false
Clearing the group ID is appropriate only when the group is genuinely absent; do not use it to detach a valid group.
3. Conditional checks for policies or backup protection
These checks apply if deletion produces a policy/hold or backup-related error:
- Retention or eDiscovery hold: Run Invalid Retention or grace eDiscovery Hold in the Microsoft 365 admin center, enter the site URL, and run the test. This requires at least the Compliance Administrator role and is unavailable in GCC High, DoD, and Microsoft 365 operated by 21Vianet. The diagnostic can identify an invalid retention policy or an eDiscovery hold within its 30-day grace period.^5^
- Microsoft 365 Backup: If the error says the site is protected by Microsoft 365 Backup, its backup must be offboarded first. This protection can apply when the site is currently protected or was protected during the previous 365 days.^6^
4. If it still disappears and returns without entering Deleted sites
That is not the documented deletion lifecycle: ordinary deleted sites remain under Deleted sites for 93 days unless permanently purged.^7^
Capture the following and open a Microsoft 365 support request:
- Site URL and whether it is group-connected.
- UTC timestamps of deletion and reappearance.
- Complete PowerShell commands and outputs.
- Results of
Get-SPOSiteandGet-SPODeletedSiteimmediately after deletion and after it returns. - Associated Microsoft 365 group object ID/status, if applicable.
- Any retention, eDiscovery, or Microsoft 365 Backup diagnostic result.
This gives support enough information to investigate the service-side deletion job rather than repeating the same client-side deletion.
References