Use a retention policy to manage the data for your organization by deciding proactively whether to retain content, delete content, or retain and then delete the content.
A retention policy lets you do this very efficiently by assigning the same retention settings at the container level to be automatically inherited by content in that container. For example, all items in SharePoint sites, all email messages in users' Exchange mailboxes, all channel messages for teams that are used with Microsoft Teams. If you're not sure whether to use a retention policy at the container level or a retention label at the item level, see Retention policies and retention labels.
The information on this page is for compliance administrators. If you are not an administrator and want to understand how retention policies have been configured for the apps that you use, contact your help desk, IT department, or administrator. If you're seeing messages about retention policies in Teams chats and channel messages, you might find it helpful to review Teams messages about retention policies.
Tip
If you're not an E5 customer, use the 90-day Microsoft Purview solutions trial to explore how additional Purview capabilities can help your organization manage data security and compliance needs. Start now at the Microsoft Purview trials hub. Learn details about signing up and trial terms.
Decide before you create your retention policy whether it will be adaptive or static. For more information, see Adaptive or static policy scopes for retention. If you decide to use an adaptive policy, you must create one or more adaptive scopes before you create your retention policy, and then select them during the create retention policy process. For instructions, see Configuration information for adaptive scopes.
Create and configure a retention policy
Although a retention policy can support multiple services that are identified as "locations" in the retention policy, you can't create a single retention policy that includes all the supported locations:
Exchange mailboxes
SharePoint sites or SharePoint classic and communication sites
OneDrive accounts
Microsoft 365 Group mailboxes & sites
Skype for Business
Exchange public folders
Teams channel messages
Teams chats
Teams private channel messages
Microsoft Copilot experiences
Enterprise AI apps
Viva Engage community messages
Viva Engage user messages
Note
Separate Teams, Copilot, and AI app locations are rolling out and may not yet be visible in your Purview tenant at this time.
If you select the Teams or Viva Engage locations when you create a retention policy, the other locations are automatically excluded. This means that the instructions to follow depend on whether you need to include the Teams or Viva Engage locations.
Note
When you use adaptive policies instead of static policies, you can configure a single retention policy to include both Teams and Viva Engage locations. This isn't the case for static policies where Teams and Viva Engage locations require their own retention policy.
When you've more than one retention policy, and when you also use retention labels, see The principles of retention, or what takes precedence? to understand the outcome when multiple retention settings apply to the same content.
Select the tab for instructions to create a retention policy for Teams, Copilots, AI apps, Viva Engage, or the other supported services (Exchange, SharePoint, OneDrive, Microsoft 365 Groups, Skype for Business):
Retention policies for Teams support shared channels. When you configure retention settings for the Teams channel message location, if a team has any shared channels, they inherit retention settings from their parent team.
Retention policies also support newly created call data records, which are system-generated messages that contain metadata for meetings and calls. All call data records are always included with the Teams chats location, even call data records for Teams channel messages and Teams private channel messages.
Select New retention policy to start the Create retention policy configuration, and name your new retention policy.
For the Assign admin units page: If your organization is using administrative units in Microsoft Entra ID, the retention policy can be automatically restricted to specific users by selecting administrative units. If your account has been assigned administrative units, you must select one or more administrative units.
If you don't want to restrict the policy by using administrative units, or your organization hasn't configured administrative units, keep the default of Full directory.
For the Choose the type of retention policy to create page, select Adaptive or Static, depending on the choice you made from the Before you begin instructions. If you haven't already created adaptive scopes, you can select Adaptive but because there won't be any adaptive scopes to select, you won't be able to finish the configuration with this option.
Depending on your selected scope:
If you chose Adaptive: On the Choose adaptive policy scopes and locations page, select Add scopes and select one or more adaptive scopes that have been created. Then, select one or more locations. The locations that you can select depend on the scope types added. For example, if you only added a scope type of User, you'll be able to select Teams chats but not Teams channel messages.
If you chose Static: On the Choose locations to apply the policy page, select one or more locations:
Teams channel message: Messages from standard and shared channel chats, and standard and shared channel meetings, but not from private channels that have their own policy location.
Teams chats: For Teams, messages from private 1:1 chats, group chats, meeting chats, and chat with yourself.
Teams private channel messages: Messages from private channel chats and private channel meetings. If you select this option, you can't select the other Teams locations in the same retention policy.
Copilot experiences: For built-in and custom Copilot experiences, all user prompts responses.
Enterprise AI apps: For non-Copilot apps onboarded or connected to your org using methods like Entra registration or data connectors, all user prompts and responses.
Currently, when you select Copilot experiences or Enterprise AI apps, all of the available subcategories are selected amd cannot be deselected.
For Decide if you want to retain content, delete it, or both page, specify the configuration options for retaining and deleting content.
You can create a retention policy that just retains content without deleting, retains and then deletes after a specified period of time, or just deletes content after a specified period of time. For more information, see Settings for retaining and deleting content.
Complete the configuration and save your settings.
Known configuration issues for Teams retention policies
Although you can select the option to start the retention period when items were last modified, the value of When items were created is always used. For messages that are edited, a copy of the original message is saved with its original timestamp to identify when this pre-edited message was created, and the post-edited message has a newer timestamp.
When you select Edit for the Teams chats location, you might see guests and non-mailbox users. Retention policies aren't designed for these users, so don't select them.
To include newly created call data records for Teams channel messages and Teams private channel messages, you must select the Teams chats location, instead of the Teams channel messages and Teams private channel messages locations.
Additional retention policy needed to support Teams
Teams is more than just chats and channel messages. If you have teams that were created from a Microsoft 365 group (formerly Office 365 group), you should additionally configure a retention policy that includes that Microsoft 365 group by using the Microsoft 365 Group mailboxes & sites location. This retention policy applies to content in the group's mailbox, site, and files. Files include Teams meeting recordings and transcripts from channel meetings.
To retain or delete Teams meeting recordings with their transcripts from user chats, you'll need a retention policy that includes the organizer's OneDrive account as the location.
If you have team sites that aren't connected to a Microsoft 365 group, which includes sites for Teams shared channels and Teams private channels, you need a retention policy that includes the SharePoint classic and communication sites or OneDrive accounts locations to retain and delete files in Teams:
Files that are shared in chat are stored in the OneDrive account of the user who shared the file.
Files that are uploaded to channels are stored in the SharePoint site for the team.
Tip
You can apply a retention policy to the files of just a specific team when it's not connected to a Microsoft 365 group by selecting the SharePoint site for the team, and the OneDrive accounts of users in the Team.
It's possible that a retention policy that's applied to Microsoft 365 groups, SharePoint sites, or OneDrive accounts could delete a file that's referenced in a Teams chat or channel message before those messages get deleted. In this scenario, the file still displays in the Teams message, but when users select the file, they get a "File not found" error. This behavior isn't specific to retention policies and could also happen if a user manually deletes a file from SharePoint or OneDrive.
Note
Retention policies for Viva Engage do not inform users when messages are deleted as a result of a retention policy.
To use this feature, your Viva Engage network must be Native Mode, not Hybrid Mode.
Select New retention policy to create a new retention policy.
For the Assign admin units page: If your organization is using administrative units in Microsoft Entra ID, the retention policy can be automatically restricted to specific users by selecting administrative units. If your account has been assigned administrative units, you must select one or more administrative units.
If you don't want to restrict the policy by using administrative units, or your organization hasn't configured administrative units, keep the default of Full directory.
For the Choose the type of retention policy to create page, select Adaptive or Static, depending on the choice you made from the Before you begin instructions. If you haven't already created adaptive scopes, you can select Adaptive but because there won't be any adaptive scopes to select, you won't be able to finish the configuration with this option.
Depending on your selected scope:
If you chose Adaptive: On the Choose adaptive policy scopes and locations page, select Add scopes and select one or more adaptive scopes that have been created. Then, select one or more locations. The locations that you can select depend on the scope types added. For example, if you only added a scope type of User, you'll be able to select Viva Engage user messages but not Viva Engage community messages.
If you chose Static: On the Choose locations to apply the policy page, toggle on one or both of the locations for Viva Engage: Viva Engage community message and Viva Engage user messages.
By default, all communities and users are selected, but you can refine this by specifying communities and users to be included or excluded.
For Viva Engage user messages:
If you leave the default at All users, Azure B2B guest users are not included.
If you select Edit for All users, you can apply a retention policy to external users if you know their account.
For Decide if you want to retain content, delete it, or both page, specify the configuration options for retaining and deleting content.
You can create a retention policy that just retains content without deleting, retains and then deletes after a specified period of time, or just deletes content after a specified period of time. For more information, see Settings for retaining and deleting content.
Complete the configuration and save your settings.
For technical details about how retention works for Viva Engage, including what elements of messages are supported for retention and timing information with example walkthroughs, see Learn about retention for Viva Engage.
Known configuration issues for Viva Engage retention policies
Although you can select the option to start the retention period when items were last modified, the value of When items were created is always used. For messages that are edited, a copy of the original message is saved with its original timestamp to identify when this pre-edited message was created, and the post-edited message has a newer timestamp.
When you select Edit for the Viva Engage user messages location, you might see guests and non-mailbox users. Retention policies aren't designed for these users, so don't select them.
Additional retention policies needed to support Viva Engage
Viva Engage is more than just community messages and private messages. To retain and delete email messages for your Viva Engage network, configure an additional retention policy that includes any Microsoft 365 groups that are used for Viva Engage, by using the Microsoft 365 Group mailboxes & sites location.
This location will also include files that are uploaded to Viva Engage communities. These files are stored in the group-connected SharePoint site for the Viva Engage community.
It's possible that a retention policy that's applied to SharePoint sites could delete a file that's referenced in a Viva Engage message before those messages get deleted. In this scenario, the file still displays in the Viva Engage message, but when users select the file, they get a "File not found" error. This behavior isn't specific to retention policies and could also happen if a user manually deletes a file from SharePoint.
Use the following instructions for retention policies that apply to any of these services:
Exchange: Email and public folders
SharePoint: Sites and SharePoint Embedded containers
OneDrive: Accounts
Microsoft 365 groups
Skype for Business
Note
If your organization is using administrative units and you're a restricted administrator assigned one or more adminsitrative units, you won't be able to configure a retention policy that includes SharePoint sites or Exchange public folders. For these locations, you must be an unrestricted administrator.
Select New retention policy to start the Create retention policy configuration, and name your new retention policy.
For the Assign admin units page: If your organization is using administrative units in Microsoft Entra ID, a retention policy that doesn't include SharePoint sites or Exchange public folders can be automatically restricted to specific users by selecting administrative units. If your account has been assigned administrative units, you must select one or more administrative units.
If you don't want to restrict the policy by using administrative units, or your organization hasn't configured administrative units, keep the default of Full directory. You must select Full directory for the policy to include the locations for SharePoint sites and Exchange public folders.
For the Choose the type of retention policy to create page, select Adaptive or Static, depending on the choice you made from the Before you begin instructions. If you haven't already created adaptive scopes, you can select Adaptive but because there won't be any adaptive scopes to select, you won't be able to finish the configuration with this option. Adaptive policies don't support the locations for Exchange public folders or Skype for Business.
Depending on your selected scope:
If you chose Adaptive: On the Choose adaptive policy scopes and locations page, select Add scopes and select one or more adaptive scopes that have been created. Then, select one or more locations. The locations that you can select depend on the scope types added. For example, if you only added a scope type of User, you'll be able to select Exchange mailboxes but not SharePoint sites.
For Decide if you want to retain content, delete it, or both page, specify the configuration options for retaining and deleting content.
You can create a retention policy that just retains content without deleting, retains and then deletes after a specified period of time, or just deletes content after a specified period of time. For more information, see Settings for retaining and deleting content on this page.
Complete the configuration and save your settings.
Separate an existing 'Teams chats and Copilot interactions' policy
Previously, Purview data retention policy used the location Teams chats and Copilot interactions for Teams chat and Copilot interactions. As of January 2025, Purview has unique retention policy locations for Teams chat and interactions with Copilots and AI apps.
Note
Separate Teams, Copilot, and AI app locations are rolling out and may not yet be visible in your Purview tenant at this time.
You can separate existing Teams Chat from Copilot interactions.
You can create new retention policies scoped to AI app interactions that are removed from existing policies.
Use the following cmdlets to split the existing Teams chat policy from AI app interactions:
Create new poicies as needed for interactions that were removed from the policy
Note
Copilot interactions that fall under a policy created before Teams chats and Copilot interactions were separated, continue to be stored in the location Teams chats and Copliot interactions. Existing policies continue to use this location, but if you want to add new Copilots going forward, you have to create new policies that store to the locations in the preceding list. Existing policies cannot be edited.
How long it takes for retention policies to take effect
When you create and submit a retention policy, it can take up to seven days for the retention policy to be applied:
First, the retention policy needs to be distributed to the locations that you selected, and then applied to content. You can always check the distribution status of the retention policy by selecting it from the Retention policies page in the Microsoft Purview compliance portal. From the flyout pane, if you see (Error) included in the status, and in the details for the locations see a message that it's taking longer than expected to deploy the policy or to try redeploying the policy, try running the Set-AppRetentionCompliancePolicy or Set-RetentionCompliancePolicy PowerShell command to retry the policy distribution:
When settings from the retention policy are already applied to content, a change in configuration to the policy will be automatically applied to this content in addition to content that's newly identified.
Some settings can't be changed after the policy is created and saved, which include the name of the retention policy, the scope type (adaptive or static), and the retention settings except the retention period.
If your retention policies aren't working as expected or you see errors related to your retention policies, use the following troubleshooting resources:
If some items for Exchange, SharePoint, OneDrive, or Microsoft 365 Groups need different retention settings from the retention policy settings you've configured, create retention labels for these exceptions.