Delete and Rename channels in Teams

"I have renamed a channel in Teams, and now the files are gone, help!"

That was the reason why I am writing this blog post. To start with, the connection between the Files tab in Teams and SharePoint works like this: when you add a new Teams team and a channel, a SharePoint site collection will be added (unless of course you choose to add a team based on an existing site). They are then connected and you can see this by going to the "Files" tab in Teams. Let's say you add a new Team that is called "O365Projects". Now this will generate a site collection with the URL "https://yoursite.sharepoint.com/sites/O365projects". On that site a folder will be added into the Documents library, and it's called "General":

That connected SharePoint folder is then displayed on the "Files" tab of your team in Teams and the files within it, the "General" folder in example here:

When you then add another channel in that same Teams group, let's call it "Instructions":

Then a new folder called "Instructions" will be added in the Documents library in SharePoint:

So what happens if someone either Rename or Delete these folders? Because they are connected now. I will describe four scenarios, what the effects are if you do any of the following actions. An important note: while I was testing this I did not close Teams in between and sometimes it looked like renaming worked, but when I restarted Teams it updated and then it was not working, so it may look like it works in Teams and that is just because it did not refresh properly so be sure to restart Teams when you rename or delete channels!v

Scenario 1: Rename a channel in Teams

If you click the three dots after a channel, and then select "Edit this channel" then you can rename the channel.

I changed the name to "Trainings". The effect was that the channel was renamed, of course, but the folder in my SharePoint documents library did not change name - it was still called "Instructions". But.. the connection still works. If I upload documents into either Teams or SharePoint to that channel, the files are visible on both places. But of course, this could end up in confusion when you go to the SharePoint site and look for documents connected to that channel and the name is totally different. Anyway, this works, but not recommended. The natural step would be to change the name in the document library to the same, what happens then? That is in our next scenario!

Scenario 2: Rename a folder connected to a channel in SharePoint

So we changed the name of our channel in Teams to "Trainings". Now we want to change the folder name in the SharePoint document library to the same, to avoid confusion, right. Okey here we go, in SharePoint on the folder, click the vertical dots and select "Rename":

Go back into Teams, what happens there? The Files area is emtpy! And the reference on Files is still pointing to "Instructions". So that will break the connection. As you can see the channel is "Trainings" but it wants to find files in a folder called "Instructions", so if you are uncertain on what folder the channel is connected to, then you will see that in the top of the Files tab in Teams (here the yellow mark is on the "Trainings" channel which is connected to the "Instructions" folder):

And now what happens in SharePoint is that it will automatically add back a new folder in the library called "Instructions"! So SharePoint will automatically match the channels, if they do not exist in there. Now I both have my new "Trainings" and the old "Instructions" folder. And this is where it could get confusing, because now you have a channel called "Trainings", which points to the "Instructions" folder which is empty because your files are stored in the "Trainings" folder.... :

Recommended solution: Move the files out of the channel (example: move all files from "Instructions" folder) to a temporary folder in SharePoint. Then delete the channel and folder, and in Teams create a new channel with the name you want. Then move the files back from the temporary folder into that new channel's folder.

Scenario 3: Delete a channel in Teams

Okey let's delete a channel in Teams and see what happens in SharePoint. I will delete the channel "Trainings". Note the message that the files will still be available (it means now on SharePoint) and you can copy that link to go to the connected folder:

And yes, after deletion the folder is still on SharePoint. So that worked. What if I then want to restore the channel? You will find it on the Teams settings tab and Channels, there is section called "Deleted". Choose to restore the channel there:

That worked because the connected folder was still on SharePoint.

What if we had deleted the folder in SharePoint also, and tried to restore the channel? Then it will restore the channel, and as soon as you click on the "Files" tab it will add back that folder to the library on SharePoint BUT the folder is... EMPTY!! So your files are gone! Teams will not restore your files. I looked in the recycle bin on SharePoint and you can restore the files from there, but it gets stuck on Restoring so not sure that will work. You cannot access the files inside folders from the recycle bin, so that may not work.

Recommended solution: For governance and traceability, do not delete the folders from SharePoint! Then you know you can always restore a channel after it is deleted and the channel will connect back to the original folder.

Scenario 4: Delete a folder connected to a channel in SharePoint

Let's find out what happens if you delete a channel folder from SharePoint while the channel is still in Teams. I deleted the folder "Presentations" in SharePoint:

Went into Teams and the Files tab and it is empty, as expected:

Go back into SharePoint to find a new folder added called "Presentations". So SharePoint will add a new folder automatically. What if we want to restore the deleted folder and files then? We did delete this by mistake! Well, that restore does not seem to work, it is stuck on "Restoring".. So these files are probably gone!

Scenario 5: Delete a channel and add a new with the same name

What if we delete a channel in Teams, the folder and files are still available in SharePoint, and then we do not use the "Restore" but instead try to add a new channel with the same name? That will not be possible,  and you will get a message saying that the channel name is already taken:

Recommended solution: Go into the tab "Channels" and restore the deleted channel. Then the connection to the folder will work and you will get back the conversations etc.

5
3
votes
Rate this article!
Subscribe
Notify of
guest

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

11 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

[…] Delete and Rename channels in Teams […]

Nic Parham

I am trying to do exactly as you describe in scenario 2 BUT if I delete the channel and create a new one, will I not loose all the chat history? I do not want that to happen! What can I do?

Is there not a way to tell Teams to point to a new folder? It seems crazy that Microsoft allow you to change the name of a Teams channel without that automatically creating changing the name of the associated files folder (or at least creating a new folder)!

Tom Rune Berg

One situation we run into is when an owner/member wants to delete a channel because they mistyped the channel name, and then rename the existing channel to the correct name, realise the SharePoint folder is wrong, then delete the channel, they find out that they now cannot create a channel with the name they want. My workaround for this is as follows: Before deleting the channel, rename it to some gibberish name, or add some gibberish to the last part of the name If you already deleted the channel and 21 days have not passed, restore the deleted channel, then… Read more »

Tlynn

I’ve read for hours trying to find a solution for this. Finally came across your comment. Tried it on multiple misnamed channels with associated document files, and it worked. Thanks for sharing!

Nishant

I had to do the same, did after a few hits and misses. Really awkward of Microsoft, hopefully they manage the linkage more tightly, and in a 2-way manner.

Robert

I think it’s worth pointing out that you can only rename a deleted channel via the Web interface.

The Desktop version, at least with Microsoft, does not offer a way to rename a deleted channel.

CiroImmobile

This is a crazy headache by Microsoft!
I hope they will fix it asap…

Tom Rune Berg

We are starting to see the banner in our tenant (Office 365 account) now. It appear as a banner in SharePoint underneath the toolbar with a link to the channel conversations in Teams.
The problem of deleting channels and the name being “used up” and changing channel name remains. I agree with all the recommendations above