Microsoft Teams channel with multiple linked SharePoint folders

Today a customer came to me with the following problem. They had managed to create two folders in SharePoint linked to the same Microsoft Teams channel. When they tried to delete the second folder they got the error message “To delete this folder, go to the channel in Microsoft Teams”

The steps below describe how I was able to reproduce this issue and how I managed to successfully delete the duplicate folder.

REPLICATING THE PROBLEM

Select the folder linked to the Teams channel and click the “Copy to” button

Copy the folder to the same document library and you will end up with two folders in the document library called General and General1 (the copy)

Select the newly copied General1 folder and you will see the “Go to channel” button, this is because both General and General1 folders are now linked to the General channel in Teams

Try deleting the General1 folder and you will get the error message “To delete this folder, go to the channel in Microsoft Teams”

Problem is that there is no channel General1 in Teams, because General1 is actually linked to the General channel, which can’t be deleted

I tried everything I could think of to delete the second folder, including CSOM, PowerShell and even SharePoint Designer but I always got the same error message

SOLUTION FOR DELETING THE FOLDER

Finally I stumbled on the following solution for deleting the folder. Select the folder and move it to your OneDrive

Presumably the SharePoint development team didn’t think anybody would be dumb enough to do this, so they didn’t throw the “To delete this folder, go to the channel in Microsoft Teams” error message spike strip in my path.

Once in my OneDrive I was able to delete the folder without puncturing any tires 🙂

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.