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 Label | Location Option to Select | Applies to | Scoped to | Notes |
Policy | SharePoint Site | Channel Files, Private Channel Files, Channel Meeting Recordings | Site(s) |
|
Policy | Microsoft 365 Group | Channel Files, Channel Meeting Recordings | Group(s) |
|
Policy | Teams Chat | 1:1 & Group Chats | User(s) |
|
Policy | OneDrive | Files shared in Teams Chat | User(s) |
|
Policy | Teams Channel Messages | Posts in Teams Channels | Team(s) |
|
Policy | Teams private channel Messages | Posts in Private Channels within Teams | User(s) |
|
Label | N/A | Individual File | File(s) |
|
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:
- Retention Policy for SharePoint Site
- 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
Choose the location to be covered. Either Microsoft 365 Groups, where you can then choose to include or exclude specific Groups
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.
Click Next after selecting your locations, then specify retention settings
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.
Set Locations to include both Teams Chat & Teams Channel Messages
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.
Review the settings then click Submit to create
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
Give your new policy a Name and a Description
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.
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.
Click Next
Review the summary of the setting you have chosen on the Review and finish page then click Submit
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.
Once the policy has been created and saved click Done on the confirmation screen. The submission process can take several minutes, so be patient!
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
Enter a descriptive name and description for users, plus a more technical description for administrators.
Click Next and choose the retention setting required. Here we have chosen a custom period to allow the selection of 6 months.
Click Next then review settings before clicking Create label.
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.
We are going to offer users a second retention label with extended retention. In this case set to 10 years with no automated deletion.
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.
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.
Adaptive scope is currently in preview and we will cover this in more detail in another blog, for now we will choose Static scope.
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.
Input a name and description for admins.
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.
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