SharePoint governance

Can't delete a SharePoint site after deleting its group?

This article explains how to handle scenarios where you see the "We couldn't find the Microsoft 365 Group connected to this site" error message.
Martin Hattingh
Updated
August 28, 2025
2 min to read

TLDR

It's by design that you can delete a Microsoft 365 group even when it is included in the scope of a Purview retention policy configured for “Microsoft 365 Group mailboxes & sites.” The policy retains content in the mailbox and SharePoint site; it doesn’t stop group deletion. SharePoint then blocks site deletion under the active retention, which is why you see orphaned sites and the “We couldn't find the Microsoft 365 Group connected to this site” message.

The symptoms

In some situations, when you delete a Microsoft 365 group with a connected SharePoint site, the group deletes successfully, but the site remains and cannot be deleted. Usually, you'll see two error messages when viewing the site in the SharePoint admin center:

  • This site has a compliance policy set to block deletion
  • We couldn't find the Microsoft 365 Group connected to this site

It seems obvious from the wording that a retention policy is what is preventing the site from being deleted, but shouldn't this have prevented the group itself from having been deleted?

The short answer is no, this is by design.

A Purview retention policy scoped to “Microsoft 365 Group mailboxes & sites” applies retention to the group’s mailbox and SharePoint site content, but it does not place a hold on (or otherwise protect) the Microsoft 365 group object itself in Entra ID.

As a result, the group can still be deleted (manually or via expiration), while the connected SharePoint site remains protected by the policy and cannot be deleted — producing the orphaned-state message “We couldn’t find the Microsoft 365 Group connected to this site.”

But how could the group have been deleted manually?

It's not possible for end-users to delete a group-connected site in the SharePoint UI (see below), which means that you'll encounter this scenario if the group was deleted using the M365 admin center, via PowerShell, or with a third-party tool which is not aware of the retention lock.

Screenshot of error message when trying to delete a group-connected SharePoint site to which a retention policy applies.

What’s happening under the hood

Retention scope & locations

In Purview, the Microsoft 365 Group mailboxes & sites policy location targets two content locations:

  • The group mailbox (Exchange).
  • The group’s SharePoint site.

The policy ensures compliant retention/disposition for content in those locations, but it doesn’t govern the lifecycle of the group directory object (the “container” itself).

What happens on deletion of the Microsoft 365 group

  • Exchange converts the group mailbox into a retained state (functionally similar to an inactive mailbox for the duration of retention), allowing eDiscovery to continue.
  • SharePoint honors the policy by placing/keeping a site-level hold, which blocks site deletion and surfaces the banner “This site has a compliance policy set to block deletion” in the SharePoint admin center. The site therefore persists (or “orphans”) even after the group is gone.

Is this acknowledged by Microsoft?

Microsoft guidance and confirms that retention policies control content in locations (mailboxes/sites) rather than preventing deletion of the group container, which is why the group deletion is not blocked by the policy.

(See Automatically retain or delete content by using retention policies and Configure Microsoft 365 retention settings)

Practical implication for SharePoint admins

Expect the SharePoint site to block deletion while retention applies. You’ll see the compliance banner in the SharePoint admin center, and deletion will fail until the retention/hold is removed or excluded.

Remediation options

There are a few actions you can take on group-orphaned site.

Option 1 - Exclude the site from retention to enable deletion

Exclude the orphaned site from the applicable retention policy (use find policies blocking site deletion), then delete the site. You may have to wait several hours (or even days) before the exclusion becomes effective.

Option 2 - Reconnect the site to a new group

If the business needs the workspace to continue as a group-connected site, it can be reconnected to a new M365 group (note that it has to be a group which does not have a SharePoint site already connected to it). This cannot be done in the admin center or in the site's UI, it needs to be done using PowerShell:

# Using PnP PowerShell
Connect-PnPOnline -Url "https://yourtenant-admin.sharepoint.com" -Interactive
Set-PnPSite -Identity "https://yourtenant.sharepoint.com/sites/sitename" -GroupId "new-group-guid"

# Or using SPO Management Shell
Connect-SPOService -Url "https://yourtenant-admin.sharepoint.com"
Set-SPOSite -Identity "https://yourtenant.sharepoint.com/sites/sitename" -GroupId "new-group-guid"

Option 3 - Archive the site

If the goal is to preserve but not actively use the content, consider archiving (Microsoft 365 Archive) or locking the site instead of deleting it. This complements retention and avoids user confusion.

Need an easy way to clean up SharePoint sprawl?
Use SProbot's content cleanup and governance tools to manage empties, orphans, duplicates, large files and lists, and sharing links
Need help with your SharePoint project?
We have helped organisations optimise their use of SharePoint since 2003
Get useful SharePoint and Teams insights first

See how SProbot can help you cut operational costs

We'll show you how to save on storage, tame content sprawl, and improve security.

Get a demo