How to set the retention Policy for Microsoft Teams Files


I want to set the retention policy for Teams Files.

As I know, I can set the policy for SharePoint Site and OneDrive for business.

I want to delete the files which belong to Teams.

How do I choose the SharePoint sites and the OneDrive accounts in the setting.


Thanks in advance.

7 Replies
best response confirmed by ThereseSolimeno (Microsoft)
Hi @Arthur_wang

Here is how to set a retention policy for Teams chats and conversations

Here is for SharePoint and OneDrive

Teams is a converged application. Files in Teams go into SharePoint (For Teams files) or OneDrive (for personal files). Setting the retention policy on SharePoint and OneDrive files is therefore setting it for files in Teams

To specify which SharePoint sites and OneDrive accounts would be when you are creating the policy - see here

Hope that answers your question

Best, Chris

@Christopher Hoard 

this might be the perfect answer.



@Arthur_wang ,

to get a quick look (not a detailed documentation) on how retention policy works ,click on the link below.


It is a Microsoft Tech community blog Post!

@Christopher Hoard 

Thanks so much for your reply.

We want to make sure if we set the retention policy for the OneDrive account, will all of the files (some belong to Teams and some not) in OneDrive for Business be deleted or just the files (chat file) belong to Teams will be deleted.

We want to set a policy that just deletes the files belong to teams and have no effect on other personal files.

Thanks so much.

Hi @Christopher Hoard 


My understanding based on this article was that Teams files get covered by the Microsoft 365 Groups location. Your guidance seems to indicate that they get covered by the SharePoint location (as is indicated in a few other places such as this). I know the features and guidance keeps evolving so mayb e it has changed since this post was published. 


Any chance you can confirm your understanding of what location should be used for the Teams files?


Thank you! 

Hello, emails and files that you use with Teams aren't included in retention policies for Teams. Only chats, channel messages and private channels messages. This data is stored in Azure and as compliance records in a hidden folder in the mailboxes of each user included in the chat, and a similar hidden folder in a group mailbox for Teams channel messages.

Private chat files are stored in the sender's OneDrive folder and files shared within a conversation are automatically added to the underlying SharePoint document library.

A retention policy applied to a Microsoft 365 group includes the group mailbox and SharePoint teams site. Files stored in the SharePoint teams site are covered with this location, that is the default value.



Yeah it keeps changing :D


At the current time, 

- Files in Standard Teams Channels in Microsoft 365 connected teams are covered under Microsoft 365 Groups 

- Files in Private Channels are covered under SharePoint (think of this as SharePoint Sites not connected to Microsoft 365 Groups)

- Files in Files App > OneDrive are covered under OneDrive


Did a blog earlier this year to clear up the confusion


Teams Real Simple with Pictures: Retention Policies on Private Channels – @Microsoft365Pro


Hope that makes sense :D 


Best, Chris

Thanks @Christopher Hoard! Sorry I am just getting to the last message. Yes, that made sense and I verified that through my testing as well :)