Forum Discussion
Deleting a Team from within Teams client UI seems to leave the associated SharePoint group site
From within the Teams client application I deleted a team. However I noticed its associated Sharepoint site is still there.
I can manually delete that also, but I just wanted to know if this is how it is supposed to work and what else might I need to delete manually associated with the deleted team?
I am running Windows 7 client.
We have an O365 Enterprise E3 license.
Further investigation shows for our E2 tenant, when you delete a Team via the Teams App, the O365 Group gets deleted, but the corresponding SharePoint site is given a LockState of "No Access", so even if you have permission to the site, it refuses to display in the browser. To see all these sites on your tenant, use the following PowerShell:
get-SPOSite | Select URL, LockState | Where lockstate -eq 'NoAccess'
To unlock the site, so you can browse it again, use this:
set-SPOSite -identity <Site URL> -lockstate "unlock"
And if you want to then delete it:
Remove-SPOSite -identity <Site URL>
Hope that helps
21 Replies
- Betty StolwykBrass Contributor
@Clifford - I gave this another go with the most current Teams Client Web UI and all is well. I created a new Team and verified that it built an associated SharePoint site, an O365 Group (visible in Outlook from the Group drop-down and visible in Azure Active Directory Groups), and Exchange Group mailbox. (@Ellya - I forgot to check on the calendar).
After verifying that all the expected objects had also been created, I proceeded to delete the Team through the Team client Web UI. (right-click Team name, and select Delete from drop-down menu)
A warning dialog box popped up:
Delete "xxxx" team
Are you sure you want to delete the team "xxxxx"? All channels, chats, files, and the Office 365 Group for this team will be deleted.
[checkbox] I understand that everything will be deleted.
buttons: [Cancel] [Delete Team]
I checked the checkbox and clicked "Delete Team" button.
Going back I verified that all associated objects had been deleted : SharePoint site, the O365 Group (no longer visible in Outlook from the Group drop-down nor in Azure Active Directory Groups), and Exchange Group mailbox.
- Marie-Hélène DUFAUBrass Contributor
To complete, it exists a delay for the deletion go up like Clifford said. I observe it too. I think this delay is due to the sync process between AAD and Teams.
So, I think the delay max to see the deletion is over 15 mn.
- Ellya GoldCopper Contributor
Further investigation shows for our E2 tenant, when you delete a Team via the Teams App, the O365 Group gets deleted, but the corresponding SharePoint site is given a LockState of "No Access", so even if you have permission to the site, it refuses to display in the browser. To see all these sites on your tenant, use the following PowerShell:
get-SPOSite | Select URL, LockState | Where lockstate -eq 'NoAccess'
To unlock the site, so you can browse it again, use this:
set-SPOSite -identity <Site URL> -lockstate "unlock"
And if you want to then delete it:
Remove-SPOSite -identity <Site URL>
Hope that helps
 
 - Clifford KennedyIron ContributorThat's great to hear! Thanks for sharing.
 
 - The Group Site should be deleted to...other community members has reported that the site is not initially removed, but after some time it's removed
- Betty StolwykBrass Contributor
Hello Juan Carlos, thank you for your answer. That does not seem to be my situation. The SharePoint site associated with the deleted Team is still there even more than 24 hours later.
- Agree with Paul, that's not correct...I recommend you to open a ticket so support can see what's happening
 
 - Marie-Hélène GUILBAUDCopper ContributorYes I confirm Juan Carlos says. When I delete a office365 group I need to wait some times (less than 30 mn) before to see the group site appears deleted.
- Betty StolwykBrass Contributor
Hello Marie,
I was not deleting the SP site directly, I was deleting a Team from within the Team UI and I had expected the associated SharePoint site to be deleted in the same process automatically. However, the SP site is still there. I can delete it manually, but I was not sure if this was a bug in the delete Team process or not.