Microsoft (Office 365) retention policies make it easy for the user and administrator to clean up and archive items in a user’s mailbox on Exchange Online. Retention policies allow automatically assigning some trigger action for an item after a certain period (for instance, moving the item to the archive mailbox or deleting it permanently).
Microsoft 365 retention policies can be used to automatically remove email items older than a specified date from a user’s mailbox. By default, retention policies apply to the Deleted Items and Junk Mail folders to automatically remove items older than 30 days.
Note. This tutorial is specific to Exchange Online retention policies and tags.
Office 365 Retention Policy vs. Retention Tag
Exchange Online offers two primary mechanisms for managing data retention: Retention Policies and Retention Tags. While both serve the purpose of controlling how long data is retained within an organization’s Office 365 environment, they differ in their scope and flexibility.
A Retention Policy is a set of rules that define how long specific types of content should be retained in Office 365. These policies can be applied to various Office 365 workloads, such as Exchange Online (emails), SharePoint Online (documents), and OneDrive for Business (individual files). A Retention Policy consists of one or more Retention Tags, each specifying a retention period. For example, an organization might have a Retention Policy that retains emails for seven years and documents for three years.
Retention Tags are components of Retention Policies. They allow organizations to define specific retention periods for different types of content within each workload. For example, within an Exchange Online Retention Policy, an organization can create Retention Tags that apply different retention periods to emails based on their importance or sensitivity. These tags can be manually applied by users or automatically applied based on predefined conditions, such as the age of the item or specific keywords.
Differences and Considerations
The key difference between Retention Policies and Retention Tags lies in their granularity and user involvement. Retention Policies provide a high-level control mechanism that applies to an entire workload, while Retention Tags allow for more nuanced retention periods based on specific content attributes.
Retention Tags require user involvement to apply them manually or to automatically tag items, while Retention Policies can be automatically applied to an entire workload.
Organizations must consider their specific compliance and business requirements when designing a data retention strategy. Retention Policies are well-suited for organizations that require consistent retention across an entire workload, while Retention Tags provide more flexibility for content-specific retention needs.
Combining both can create a comprehensive and customizable data retention framework within Office 365.
Note. You can also check our article, Configuring Office 365 Archiving Policy.
Applying Office 365 Retention Policies in Outlook Web App
By default, retention policies do not apply to other folders in the mailbox (except for Deleted Items and Junk). But the user can manually set retention tags for non-default folders.
Users can manually set the retention labels for email items in their Office 365 mailbox.
First, sign in to the Outlook Web App.
Right-click on the folder or email message for which to change retention settings. Click Assign Policy and select a retention label from the list.
Note that the Retention policy settings are inherited from the parent folder (Use parent folder policy) by default.
Creating Office 365 Retention Policy using Microsoft Purview
Some organizations may need more than the predefined default retention policies and want to add new ones. Here’s an example of how to create a new Office 365 retention policy.
First, log in to the Microsoft Purview admin center and navigate to Data lifecycle management → Exchange (Legacy).
Create a Retention Tag
Suppose you want to create a retention tag that deletes mailbox items after 14 days. Here’s the instruction to create it.
- Click the MRM Retention Tags tab and click the New Tag button.
- In the “Name your tag” step, enter the tag name and description and click Next. Make your tag name and description unique and easy to identify.
- In the “Application method” step, select the method you prefer to apply the tags. Your options are:
- Automatically to the entire mailbox — Also known as the default policy tag (DPT). This method automatically applies the retention tag to all items in the mailbox without a retention tag.
- Automatically to default folder — Also known as the retention policy tag (DPT). This method automatically applies the retention tag to a specified default folder.
- By users to items and folders (personal) — Also known as personal tags. This method allows users to apply tags to custom folders and individual items in the mailbox.
In this example, we’ll choose the option By users to items and folders (personal) and click Next.
- Next, specify the Retention period and Retention action. This example sets the retention period to 14 days and permanently deletes the items.
- Review the retention tag settings. When satisfied with the retention tag, click Submit to create it.
- Lastly, click Done after the retention tag has been created.
The new retention policy tag now appears in the list.
Update the Retention Policy
Once the retention tag has been created, it isn’t readily available for users to select in their mailboxes. If they want to use this retention tag, they must manually add it to their mailbox in OWA by navigating to Settings → Mail → Retention policies → Add new policy.
But that’s not a positive user experience. The better option is for the retention tag to be available to the users without doing these extra steps. The way to achieve that is by adding the retention tag to the existing retention policy.
- Click the MRM Retention Policies, select the existing retention policy to update, and click Edit.
- Click Add tag.
- Check the box next to the retention tag you created, and click Add.
- Now that the retention tag is added click Next.
- Click Submit to save the policy.
- Finally, click Done.
- Wait until the Managed Folder Assistant has finished processing the mailboxes. Once completed, the user can use the new retention policy tag.
Creating Office 365 Retention Policy using Exchange Online PowerShell
You can also create and manage Office 365 retention policies using Exchange Online PowerShell. This method requires the Exchange Online Management (EXO v2 / EXO v3) module.
First, connect to the Exchange Online PowerShell session.
Connect-ExchangeOnline -UserPrincipalName firstname.lastname@example.org
Create a Retention Tag
Run this command to create a new retention tag. This retention tag has these settings:
- Name: Permanently Delete Items After 24 Days.
- Type: Personal.
- Retention age: 24 days.
- Action after the retention period: Permanently delete.
New-RetentionPolicyTag "Permanently Delete Items After 24 Days" `
-Type Personal -RetentionEnabled $true `
-AgeLimitForRetention 24 -RetentionAction PermanentlyDelete
Update the Retention Policy
For users to see the new retention tag in their mailbox automatically, you must add it to their existing retention policy. To do so, run the following commands to add the new retention tag to the default retention policy.
Note. This tutorial uses the Default MRM Policy. The retention policy name may be different in your environment. Make sure to specify the correct one.
# Specify the retention policy and retention tag.
$retentionPolicy = 'Default MRM Policy'
$policyTag = 'Permanently Delete Items After 24 Days'
# Get existing retention tags linked to the retention policy
$taglinks = (Get-RetentionPolicy $retentionPolicy).RetentionPolicyTagLinks
# Add the new archive retention policy tag
# Update the retention policy
Set-RetentionPolicy -Identity $retentionPolicy -RetentionPolicyTagLinks $taglinks
Depending on your organization and mailbox size, the Managed Folder Assistant may take a few minutes to several hours to process the mailboxes. Once the Managed Folder Assistant is finished running, the new retention policy will be available for users to select.
Office 365 Retention Policy is a game-changer for businesses seeking to optimize data management, enhance compliance, and bolster security. Embracing this technology empowers organizations to stay one step ahead in an ever-evolving digital world.
By leveraging the full potential of the Office 365 Retention Policy, businesses can confidently focus on their core objectives, knowing that their data is in safe and capable hands. So, take the leap and explore the endless possibilities of the Office 365 Retention Policy today!