How to delete a Loop Workspace connected to a Teams channel?

Microsoft enabled (Teams) channel-connected Loop Workspaces in April. The workspace container is connected to the Microsoft 365 group, and all members have access to the workspace content. The team owners are also owners of the Loop workspace.

Read:  Create a new Loop Workspace container connected to a Teams channel

During my test, I wondered how Team owners could delete such channel-connected workspaces. I concluded that it’s not possible for them. Even if the owner deletes the Teams channel, the workspace is still undeletable. The Loop workspace remains.

A week ago, Microsoft confirmed this conclusion via an Insider post. A team owner cannot delete such workspaces, at least not in the current release state.
Microsoft prepared a comparison between Loop workspace for Teams channels and workspaces created in Loop on the web.

Loop workspace for Teams channels vs. Loop workspace on the web
Loop workspace for Teams channels vs. Loop workspace on the web
  1. It’s hard for me to understand how a product team can release a feature without adding an option for deletion. It’s not unusual for team owners to want to delete a channel workspace. But it’s also not surprising for the Loop product if you remember the past.
  2. As the workspace is not deleted if an owner deletes the Teams channel, your organization will soon have orphaned Loop workspace containers.
  3. Remember that all Loop workspace containers consume your SharePoint tenant storage (which is not cheap if you must buy more storage).
  4. Microsoft does not mention that accounts with the SharePoint Embedded Administrator role can delete these channel-connected Loop workspace containers via the SharePoint admin center or PowerShell.
    Note, accounts with the SharePoint Administrator role do not have permissions to delete Loop / SharePoint Embedded containers.

Before you delete such a channel container, here are some notes to consider:

  • It’s important to remember that a Teams channel has one connected Loop workspace. If you delete a channel workspace, you delete the workspace content for the entire Teams channel (but not for other Teams channels).
  • If the workspace is deleted, an existing Loop app in the Teams channel will show an error. Remove the channel tab to fix it.
Channel workspace has been deleted
Channel workspace has been deleted
  • You can add the Loop app again to the channel. Teams will respond with an error, but if you confirm the error, Teams will create a new Loop workspace for the channel.
There was a previous workspace. Skip the error, Teams will create a new one.
There was a previous workspace. Skip the error, Teams will create a new one.
How do you delete a Loop workspace container in the SharePoint admin center?
  1. Your account must have the SharePoint Embedded Administrator role assigned.
  2. Open your SharePoint admin center > Containers > Active containers and filter for the ownership type Group.
Filter the ownership type Group
Filter the ownership type Group
  1. Find your container, mark it, and delete it. The container will be moved to the SharePoint recycle bin for 93 days (and will still consume your SharePoint storage). You can also delete it from the recycle bin.


How do you delete a Loop workspace container with PowerShell?
  1. Your account must have the SharePoint Embedded Administrator role assigned.
  2. You need the latest version of the SharePoint Online PowerShell module.
  3. Connect to your SharePoint tenant and list all GroupOwned workspaces. As I described some days ago, SharePoint Online PowerShell now includes the OwnershipType property for Loop containers.
Read:  New PowerShell property for Loop containers: OwnershipType

Be careful if you have more than 200 Loop containers in your tenant. By default, SharePoint Online PowerShell returns just 200 containers, so you must loop through all the containers. The documentation includes paging samples.

PowerShell
# Keep in mind that you still have to use PowerShell 5 for SharePoint Online PowerShell

Import-Module Microsoft.Online.SharePoint.PowerShell
Connect-SPOService -Url "https://<Tenant>-admin.sharepoint.com"

$AllGroupOwnedLoopContainers = Get-SPOContainer -OwningApplicationID a187e399-0c36-4b98-8f04-1edc167a0996 | ?{$_.OwnershipType -eq "GroupOwned" }
$AllGroupOwnedLoopContainers | sort CreatedOn | select ContainerName,OwnershipType,CreatedOn,PrincipalOwner,ContainerId | ft

Loop containers connected to a Teams channel
Loop containers connected to a Teams channel
  1. Find your Loop container ID and delete the container with Remove-SPOContainer. The container will be moved to the SharePoint recycle bin for 93 days (and will still consume your SharePoint storage).
PowerShell
$TeamChannelLoopContainer = Get-SPOContainer -Identity "<ContainerId>"
Remove-SPOContainer -Identity $TeamChannelLoopContainer.ContainerId

  1. Optional: Remove the Loop container from the SharePoint recycle bin with Remove-SPODeletedContainer.
PowerShell
Remove-SPODeletedContainer -Identity $TeamChannelLoopContainer.ContainerId

Share
Avatar photo

Tobias Asböck

Tobias is a Senior System Engineer with around ten years of professional experience with Microsoft 365 products such as SharePoint Online, SharePoint Premium, OneDrive for Business, Teams Collaboration, Entra ID, Information Protection, Universal Print, and Microsoft 365 Licensing. He also has 15+ years of experience planning, administering, and operating SharePoint Server environments. Tobias is a PowerShell Scripter with certifications for Microsoft 365 products. In his spare time, Tobias is busy with updates in the Microsoft 365 world or on the road with his road bike and other sports activities. If you have additional questions, please contact me via LinkedIn or [email protected].

2 Responses

  1. Ton van der Hoeve says:

    I was struggling with this as well.

    The fact that Loop spaces from channels are dumped in my other spaces was strange enough, making a mess of my workspaces, but not enamelling deletion is a nightmare.

    • Absolutely.
      An additional point: If you implement a Cloud Policy preventing Loop Workspace creation, the policy is ignored for Teams channels. I was able to simulate this, too. An account created the channel 3 and 4 without permission to create Loop Workspaces. There was a short error for the account, but in the background, the workspaces were created.

Leave a Reply

Your email address will not be published. Required fields are marked *