When you delete a Microsoft Teams team, its connected SharePoint site is not always removed. This leaves orphaned sites that consume storage and may expose sensitive data. SharePoint owners need a reliable method to detect these orphaned sites after a Teams cleanup. This article explains why orphaned sites occur and provides a step-by-step checklist to find and manage them.
Key Takeaways: Orphaned SharePoint Site Detection Checklist
- SharePoint admin center > Active sites: Filter by site type “Team site” to list all sites connected to Microsoft 365 Groups.
- Microsoft 365 admin center > Groups > Deleted groups: View recently deleted groups to identify orphaned sites that still exist.
- PowerShell cmdlet Get-SPOSite: Use the -Filter parameter to find sites with no associated group in the tenant.
Why Orphaned SharePoint Sites Appear After Teams Cleanup
Each Microsoft Teams team backs a Microsoft 365 group. That group owns a SharePoint team site. When you delete a team from the Teams app, the Microsoft 365 group is soft-deleted and moved to the Azure AD recycle bin. The group and its SharePoint site are not permanently removed until the group is hard-deleted from the recycle bin or after 30 days. If the group is hard-deleted, the SharePoint site is also deleted. However, if the group is only soft-deleted and you restore it, the site comes back. The orphaned site scenario occurs when the group is permanently deleted but the SharePoint site remains due to a retention policy, a site lock, or an admin action that disconnects the site from the group. In other cases, an admin may delete the group directly from Azure AD without removing the SharePoint site. The result is a SharePoint site that has no active Microsoft 365 group owner, no Teams connection, and no clear way to manage it through standard Teams administration.
Checklist to Find Orphaned SharePoint Sites
Use this checklist to identify orphaned sites in your SharePoint tenant. Perform each step in order. Record the site URLs and names for later action.
- Open the SharePoint admin center
Sign in to your Microsoft 365 admin account. Go to the SharePoint admin center by typing admin.microsoft.com/SharePoint in your browser. Select Active sites from the left navigation menu. - Filter by site type
At the top of the Active sites list, click the Filter button. Choose Team site from the dropdown. This shows all team sites, including those connected to Microsoft 365 groups and Teams. Note that communication sites are not affected by Teams cleanup. - Export the site list
Click the Export button at the top of the site list. The export downloads a CSV file containing all filtered sites. Save the file to your local drive. Open the CSV in Excel or a text editor. - Check the GroupId column
In the CSV file, locate the column named GroupId. This column contains the unique identifier of the Microsoft 365 group connected to each site. A blank GroupId cell indicates the site is not linked to any group. These sites are potential orphans. Write down the site URL and name for each blank GroupId row. - Verify group status in the Microsoft 365 admin center
Open the Microsoft 365 admin center at admin.microsoft.com. Go to Teams & groups > Deleted groups. Look for the group name that matches the site you identified. If the group is listed as deleted, the site is orphaned. If the group is not listed, the group was hard-deleted and the site remains orphaned. - Use PowerShell to confirm orphaned sites
Install the SharePoint Online Management Shell if you have not done so. Run the following command to connect to SharePoint:Connect-SPOService -Url https://yourtenant-admin.sharepoint.com. Then run:Get-SPOSite -IncludePersonalSite $false -Filter "GroupId -eq '00000000-0000-0000-0000-000000000000'". This returns all sites with no group association. Compare the results with your CSV list. - Check the site for remaining content
Visit each orphaned site URL. Review the document libraries, lists, and permissions. Document the storage size and any sensitive data. This step helps you decide whether to delete the site or keep it.
If You Find Orphaned Sites: What to Do Next
After identifying orphaned sites, you have three options. Choose based on your organization’s data retention requirements and security policies.
Orphaned Site Still Has Active Group in Soft-Delete
If the Microsoft 365 group is in the soft-deleted state, restore the group to reconnect the site. In the Microsoft 365 admin center, go to Teams & groups > Deleted groups. Select the group and click Restore group. The site regains its group owner. You can then decide to keep the team or delete it properly.
Orphaned Site Has No Group and Contains Important Data
If the group is permanently deleted but the site holds business data, convert the site to a communication site or assign a new owner. In the SharePoint admin center, select the site. Click Permissions and add a site owner. Then go to Settings and change the site type if needed. This keeps the content accessible.
Orphaned Site Has No Group and No Valuable Content
If the site is empty or contains only test data, delete it to free storage. In the SharePoint admin center, select the site. Click Delete at the top of the page. Confirm the deletion. The site moves to the SharePoint recycle bin. Empty the recycle bin after 30 days to permanently remove the site.
Preventing Orphaned Sites in Future Cleanups
To avoid orphaned sites, always delete Teams through the Microsoft 365 admin center or Azure AD. This ensures the group and the SharePoint site are removed together. Train team owners to use the correct deletion path: go to the Teams app, select the team, click the three dots, choose Delete the team, and confirm. Alternatively, use the Microsoft 365 admin center to delete the group. Never delete a group directly from Azure AD without first checking for connected SharePoint sites. Set a retention policy for SharePoint sites that automatically removes sites after a group is deleted. Use the SharePoint admin center Policies > Retention to create a policy that deletes orphaned sites after 90 days.
Team Site vs Orphaned Site: Key Differences
| Item | Team Site (Connected) | Orphaned Site |
|---|---|---|
| Group association | Linked to an active Microsoft 365 group | No group or group is deleted |
| Owner management | Managed through group owners | No owner; must be assigned manually |
| Storage consumption | Counts toward group storage | Counts toward tenant storage |
| Deletion behavior | Deleting the group deletes the site | Must be deleted separately |
| Visibility in Teams | Appears in Teams app | Not visible in Teams |
Now you can systematically find orphaned SharePoint sites after a Teams cleanup. Run the checklist monthly to catch new orphaned sites early. Use the SharePoint admin center export and PowerShell commands to automate detection. For long-term management, configure a retention policy that automatically deletes sites with no group after 90 days.