SOLVED
Home

Does deleting a Microsoft Teams also delete the corresponding SharePoint Site and its files?

%3CLINGO-SUB%20id%3D%22lingo-sub-328463%22%20slang%3D%22en-US%22%3EDoes%20deleting%20a%20Microsoft%20Teams%20also%20delete%20the%20corresponding%20SharePoint%20Site%20and%20its%20files%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-328463%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20if%20i%20have%20a%20team%20with%20files%20in%20and%20delete%20it%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWill%20all%20the%20files%2Faccessing%20the%20sharepoint%20site%20also%20be%20deleted%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20Does%20a%20team%20auto%20delete%20at%20any%20stage%3F%20E.g%20after%201%20year%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-328463%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-328474%22%20slang%3D%22en-US%22%3ERe%3A%20Does%20deleting%20a%20Microsoft%20Teams%20also%20delete%20the%20corresponding%20SharePoint%20Site%20and%20its%20files%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-328474%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F252982%22%20target%3D%22_blank%22%3E%40testio2%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EWould%20advise%20this%20thread%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FOffice-365%2FDeleting-a-Team-from-within-Teams-client-UI-seems-to-leave-the%2Fm-p%2F62484%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FOffice-365%2FDeleting-a-Team-from-within-Teams-client-UI-seems-to-leave-the%2Fm-p%2F62484%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EWhen%20you%20delete%20a%20Team%20via%20the%20Teams%20App%2C%20the%20O365%20Group%20gets%20deleted%2C%20but%20the%20corresponding%20SharePoint%20site%20is%20given%20a%20LockState%20of%20%22No%20Access%22%2C%20so%20even%20if%20you%20have%20permission%20to%20the%20site%2C%20it%20refuses%20to%20display%20in%20the%20browser.%20To%20see%20all%20these%20sites%20on%20your%20tenant%2C%20use%20the%20following%20PowerShell%3A%3CBR%20%2F%3Eget-SPOSite%20%7C%20Select%20URL%2C%20LockState%20%7C%20Where%20lockstate%20-eq%20'NoAccess'%3CBR%20%2F%3E%3CBR%20%2F%3ETo%20unlock%20the%20site%2C%20so%20you%20can%20browse%20it%20again%2C%20use%20this%3A%3CBR%20%2F%3Eset-SPOSite%20-identity%20%3CSITE%20url%3D%22%22%3E%20-lockstate%20%22unlock%22%3CBR%20%2F%3E%3CBR%20%2F%3EAnd%20if%20you%20want%20to%20then%20delete%20it%3A%3CBR%20%2F%3ERemove-SPOSite%20-identity%20%3CSITE%20url%3D%22%22%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAFAIK%2C%20Teams%20don't%20auto%20delete%20by%20default.%20However%2C%20they%20are%20typically%20built%20on%20Office%20365%20groups%20and%20you%20could%20use%20a%20group%20expiration%20policy.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-gb%2Farticle%2FOffice-365-Group-Expiration-Policy-8d253fe5-0e09-4b3c-8b5e-f48def064733%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-gb%2Farticle%2FOffice-365-Group-Expiration-Policy-8d253fe5-0e09-4b3c-8b5e-f48def064733%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EBest%2C%20Chris%3C%2FSITE%3E%3C%2FSITE%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
testio2
Contributor

Hi if i have a team with files in and delete it

 

Will all the files/accessing the sharepoint site also be deleted?

 

Also Does a team auto delete at any stage? E.g after 1 year?

 

Thanks

1 Reply
Solution

Hi @testio2

Would advise this thread

https://techcommunity.microsoft.com/t5/Office-365/Deleting-a-Team-from-within-Teams-client-UI-seems-...

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>

AFAIK, Teams don't auto delete by default. However, they are typically built on Office 365 groups and you could use a group expiration policy.

https://support.office.com/en-gb/article/Office-365-Group-Expiration-Policy-8d253fe5-0e09-4b3c-8b5e-...

Best, Chris

Related Conversations
Teams error code - 6
damnit95 in Office 365 on
4 Replies
Sharing an excel sheet public link
shunde3 in Microsoft Teams on
6 Replies
'Open in Sharepoint' URL opens to Blank page
John Benak in Microsoft Teams on
4 Replies