Retention Policies for Teams

Microsoft Teams stores in data in multiple locations which makes managing retention of Teams data more challenging.

When we talk about retention in Microsoft 365, including Teams, we are looking at rules to control how long data is kept for before it can be deleted AND/OR to enforce deletion when content reaches a certain age.

Once you understand where the data is stored you can control data retention in Microsoft 365 with a combination of retention labels and polices. Before we look at the information governance settings to manage Teams data, we need to clarify the difference between retention policies and retention labels.

Retention policies are applied to locations such as SharePoint Sites, Teams or Exchange mailboxes. In other words policies control the default behaviour for all information stored in the container the policy is applied to.

Retention labels are applied to individual items such as an individual file, folder or an email. Retention labels are used explicitly set behaviour on the item it is applied to. Labels cannot be applied to containers (sites, teams or mailboxes) nor to Teams chat messages. Labels are published using Label policies.

Thus for Teams we mainly set retention behaviour using retention policies though it is also possible to use retention labels on the individual files stored in Teams.

Before we look in more detail at how to set retention for the different types of information associated with Teams. Here is a summary of the retention policy and labels we can set for Microsoft Teams.

Policy or LabelLocation Option to SelectApplies toScoped toNotes
PolicySharePoint SiteChannel Files, Private Channel Files, Channel Meeting RecordingsSite(s)
  • Also applies to any additional lists or libraries in the site, not just channel files.

  • You need the SharePoint Site URL(s) to scope to individual Team(s)

  • When including private channels, you will need the URL for the dedicated SharePoint site for the private channel.

  • Note – separate policy for meeting recordings coming early 2022
PolicyMicrosoft 365 GroupChannel Files, Channel Meeting RecordingsGroup(s)
  • Also applies to any additional lists or libraries in the site.

  • DOES NOT apply to private channel files, as these are NOT Microsoft 365 groups

  • Note – separate policy for meeting recordings coming early 2022
PolicyTeams Chat1:1 & Group ChatsUser(s)
  • Each party in the conversation will have a copy of the message in their Teams Chat store within their mailbox. If you scope this policy to individual users you may not cover all copies of the conversation. You cannot include external users but guest accounts can be included.

  • Applies to messages only, not files shared in Chat
PolicyOneDriveFiles shared in Teams ChatUser(s)
  • Applies to all files in the OneDrive accounts, not just those shared in Teams Chat.

  • This will also cover Meeting Recordings for scheduled or ‘Meet Now’ meetings (Note – separate policy for meeting recordings coming early 2022)
PolicyTeams Channel MessagesPosts in Teams ChannelsTeam(s)
  • This does not include private channels within the team, nor files shared in the posts.
PolicyTeams private channel MessagesPosts in Private Channels within TeamsUser(s)
  • Each member of the private channel will have a copy of the message in their Teams Chat store within their mailbox. If you scope this policy to individual users you may not cover all copies of the conversation. You cannot include external users but guest accounts can be included.

  • Applies to messages only, not files shared in Chat
LabelN/AIndividual FileFile(s)
  • Can be assigned to individual file(s) once published with a Label Policy to SharePoint site(s) associated with the Team(s). Can also be auto applied based on sensitive information types or trainable classifiers

 

At the time of writing Microsoft have announced the ability to auto-apply retention labels to cloud attachments (files shared in chat), this will be covered in more detail in a later article.

Now let’s look at how to set up a few of these in more detail.

Set Default Retention for Files Stored in Teams using a Retention Policy

Files in Teams are stored in the SharePoint site owned by the Microsoft365 group which the Team is based upon. So there are two ways to set retention covering Teams files:

  1. Retention Policy for SharePoint Site
  2. Retention Policy for Microsoft 365 Group

Generally, I use the Microsoft 365 group method as you do not need to know the URL to specify the Team, though apart from that both method work well.

This retention policy would also cover recordings of channel meetings, as these are saved in the SharePoint site, but it does NOT cover chat messages and other meeting recordings.

To create a retention policy for files in Teams:

In the Compliance Center (https://compliance.microsoft.com/) Choose Information Governance then Retention Policies and Create new policy.

Give your policy a name and description, then click Next

Microsoft 365 Teams Retention

Choose the location to be covered. Either Microsoft 365 Groups, where you can then choose to include or exclude specific Groups

Microsoft 365 Teams Retention

Or if you go with the SharePoint location option, in the search box you need to enter the URL of the sharePoint site to select or exclude sites.

Microsoft 365 Teams Retention

Click Next after selecting your locations, then specify retention settings

Microsoft 365 Teams Retention

Click Next to review settings and then Submit to create the policy.

Retention policies take up to 24hrs to come into effect and do not need to be published.

Setting Retention for Teams Chat & Channel Messages using a Retention Policy

Create New retention policy and enter name and description.

Microsoft 365 Teams Retention

Set Locations to include both Teams Chat & Teams Channel Messages

Microsoft 365 Teams Retention

In this example we are using both locations and not setting any exclusions so as to pick up ALL messaging throughout Teams (though this does NOT cover private channel messages).
Choose required retention settings.

Microsoft 365 Teams Retention

Review the settings then click Submit to create

Microsoft 365 Teams Retention

Set Retention for Private Channels using a Retention Policy

To create a retention policy for private channels:

Navigate to the compliance center https://compliance.microsoft.com
Under Solutions select Information governance
Choose Retention Policies
Click/tap New retention policy

Microsoft 365 Teams Retention

Give your new policy a Name and a Description

Microsoft 365 Teams Retention

Click Next
In Locations, choose Teams private channel messages
Select users to includes or exclude from the policy
Note: when choose items to include or exclude, the options are only users, as private channel messages are held in the mailboxes of the members of the private channel, so you choose which users you wish to retain private channel messages for, NOT which channels.

Microsoft 365 Teams Retention

Click Next
On the Retention settings page choose the time messages should be retained for. These options are the same as for standard channel messages.

Microsoft 365 Teams Retention

Click Next
Review the summary of the setting you have chosen on the Review and finish page then click Submit

Microsoft 365 Teams Retention

Wait for the submission to complete. NOTE: As shown on the submitting screen below, the policy can take up to 24hrs to come into effect.

Microsoft 365 Teams Retention

Once the policy has been created and saved click Done on the confirmation screen. The submission process can take several minutes, so be patient!

Microsoft 365 Teams Retention

Set Options for File Retention for Teams Channel Files using Retention Labels & a Label Policy

To create a retention label for use on files:

Navigate to the compliance center https://compliance.microsoft.com
Under Solutions select Information governance
Choose Labels
Click/tap Create a label

Microsoft 365 Teams Retention

Enter a descriptive name and description for users, plus a more technical description for administrators.

Microsoft 365 Teams Retention

Click Next and choose the retention setting required. Here we have chosen a custom period to allow the selection of 6 months.

Microsoft 365 Teams Retention

Click Next then review settings before clicking Create label.

Microsoft 365 Teams Retention

Wait for the label to be created and decide if you want to publish immediately or later. In this example we want to publish a number of labels together so we are going to choose Do Nothing.

Microsoft 365 Teams Retention

We are going to offer users a second retention label with extended retention. In this case set to 10 years with no automated deletion.

Microsoft 365 Teams Retention

Once you have created your labels you publish them using a Label policy to make them available for your users to apply to files. To create a label policy, got to Label policies and choose Publish labels.

Microsoft 365 Teams Retention

First step in creating a label policy is to choose the labels you want to publish. Click the link then located and choose the required labels and click Add.

Microsoft 365 Teams Retention

Microsoft 365 Teams Retention

Adaptive scope is currently in preview and we will cover this in more detail in another blog, for now we will choose Static scope.

Microsoft 365 Teams Retention

The next step is to choose which locations the labels should be available in. In this example we want the labels to be available on all Teams. So we are going to publish them to all Microsoft 365 groups. Not all groups are Teams but in this example we have decided to make the label available in all groups. This is primarily to simplify management of this policy.

Microsoft 365 Teams Retention

Input a name and description for admins.

Microsoft 365 Teams Retention

Review the summary and click submit to create the policy. Take note of the guidance that it will take up to 1 day for labels to appear for users.

Microsoft 365 Teams Retention

Further Reading & References

Updates from Microsoft Ignite (Nov 2021) on governing data in Microsoft Teams: https://techcommunity.microsoft.com/t5/security-compliance-and-identity/microsoft-information-governance-new-ways-to-govern-your-data-in/ba-p/2815238?WT.mc_id=M365-MVP-5004583

https://docs.microsoft.com/en-us/microsoftteams/retention-policies?WT.mc_id=M365-MVP-5004583

https://docs.microsoft.com/en-gb/microsoftteams/cloud-recording – auto-expiration-of-teams-meeting-recordings?WT.mc_id=M365-MVP-5004583

Retention for modern attachments https://docs.microsoft.com/en-us/microsoft-365/compliance/apply-retention-labels-automatically?view=o365-worldwide&WT.mc_id=M365-MVP-5004583#auto-apply-labels-to-cloud-attachments