Deleting Private Channels in Microsoft Teams!


Private channels have been available in Teams for several months now. As a result, plenty of people have created plenty of private channels. Some were created accidentally and some were created for testing purposes. Either way, I’ve been asked to delete several of these channels…


Fun fact #1: Creating a private channel in Microsoft Teams will create new SharePoint Online site collection.

Note: Site collections created by private channels need to be excluded from all Retention Policies before they can be deleted.

But to exclude the site collection, I need the site collection’s URL:

Connect-SPOService "https://{tenant}-admin.sharepoint.com"
Get-SPOSite -IncludePersonalSite $false -Limit All | ? { $_.Template -eq "TEAMCHANNEL#0" } | Select Url, Owner, Title | ft
Disconnect-SPOService

Fun fact #2: Private channels aren’t listed under Active Sites in the new SPO Admin Center. I assume that this will be changed soon, but PowerShell is always an option to audit the environment.

Note: Site collections created for private channels use the TEAMCHANNEL#0 site template.


Additionally, because these new site collections aren’t listed in the SPO Admin Center, I can’t add myself as an owner via the UI. I’m not the tenant admin, but I at least need to be a Site Collection Admin (SCA) to delete the site. But the person that created the channel is a SCA by default! They can delete their own private channel. I just have to provide them with the delete site link:

https://{tenant}.sharepoint.com/{site-path}/_layouts/15/deleteweb.aspx


Conclusion:
Private channels are here, but this change comes with some interesting quirks.

(1) Architects and admins must be aware that new site collections will spring up. Microsoft increased the site collection limit per tenant, so there’s no need for alarm. Microsoft supports up to 2 million site collections.

(2) The inherit ability to grant myself ownership of the site and delete it is missing from the SPO Admin Center, but the end-user is empowered to remove their own site(s).

“Change is only a good thing if you change in a good way.”

Malcolm X

One thought on “Deleting Private Channels in Microsoft Teams!

Leave a comment