Unable to Completely Delete Restored SharePoint Site

Ashwani Kumar 0 Reputation points
2026-11-04T02:56:14.02+00:00

Have run the script, then able to delete the restored site but it doesn’t appear under Deleted Sites. Then next day it comes back again in SharePoint Admin Center as Active Site.

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments

2 answers

Sort by: Newest
  1. Kai-Ex 2,480 Reputation points Microsoft External Staff Moderator
    2026-11-04T03:34:48.2166667+00:00

    Dear Ashwani Kumar,

    I understand the concern. If the restored SharePoint site can be deleted but does not appear under Deleted Sites and then reappears as an Active Site the next day, it may indicate that the site is being restored automatically by a retention policy, compliance hold, or another process running in the tenant.

    To help narrow this down, could you please provide a bit more information?

    • What type of site is this (Team site, Communication site, Microsoft 365 Group-connected site, or OneDrive site)?
    • Are there any Microsoft Purview retention policies, retention labels, or eDiscovery holds applied to the site?
    • Are there any error messages when you attempt to delete the site?
    • Is the site associated with a Microsoft 365 Group, and if so, does the group also reappear?
    • Have you checked the Microsoft 365 Audit Log to see whether another account or process is restoring the site?
    • Is this behavior affecting only one site or multiple sites in the tenant?

    In the meantime, as this is a public community forum, no one here has access to your tenant to confirm the root cause, but you may want to check the following:

    Step 1: Microsoft Purview Retention Policies

    • Go to the Microsoft Purview Compliance Portal and check whether the site is included in a retention policy.
    • A retention policy can preserve content and prevent the site from being fully deleted.
    • For reference: Learn about retention for SharePoint and OneDrive

    Step 2: eDiscovery Holds or Litigation Holds

    • Verify whether the site is subject to an eDiscovery case hold.
    • Sites on hold may be restored or remain recoverable even after deletion attempts.
    • For reference: Learn about eDiscovery

    Step 3: Review Audit Logs

    • Search the Microsoft 365 Audit Log for site restore, site creation, or related administrative actions.
    • This can help determine whether another administrator or an automated process is restoring the site.
    • For reference: Audit log activities

    Thank you for your patience and understanding. If you have any questions or if I have misunderstood anything, please feel free to reach out. I'm looking forward to your update

    Was this answer helpful?


  2. AI answer

    2026-11-04T02:57:09.2+00:00

    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:

    1. Remove-SPOSite against the active site.
    2. Remove-SPODeletedSite only 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 with Remove-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-SPOSite and Get-SPODeletedSite immediately 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

    1. Remove-SPOSite-Syntax
    2. Remove-SPODeletedSite-Description
    3. Delete a site
    4. Can't delete a site connected to a Microsoft 365 group permanently
    5. Can't delete a site because of a retention policy or eDiscovery hold
    6. "Site is protected by Microsoft 365 Backup and cannot be deleted" error
    7. Restore deleted sites
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.