How to set up Microsoft 365 archive policy

With thousands of emails exchanged every day even in a single medium-sized organization, user’s mailboxes might quickly get full. In Exchange Online, you can try to overcome this problem by enabling archive mailboxes and telling users to move old items to them. Unfortunately, the human factor can be the weak link in the process. This is where Microsoft 365 archive policies come into play, offering you a centralized and automated way to keep your users’ primary mailboxes below the cap.

Archive policy configuration in Microsoft 365 (Office 365)
  1. A short introduction to archive mailboxes
  2. Create retention tags (rules for email archiving)
  3. Configure your archiving policy:
  4. Backup software as a better alternative to archiving

A short introduction to Exchange Online archive mailboxes

Before diving into archive policies, it’s good to learn more about archive mailboxes in Exchange Online. This article lets you learn about archive mailbox size limits, licensing, and a bunch of other useful details. Remember also to check if your Microsoft 365 plan lets you use the archiving features in Exchange Online.

Before you implement any archive policy, you need to enable archive mailboxes. If you haven’t enabled archive mailboxes for your users yet, use the information from this CodeTwo Knowledge Base article to turn them on. Otherwise, completing the steps below doesn’t make any sense.

Create retention tags – rules for email archiving

Once the archive mailboxes have been set up, you need to complete the second phase of preparations to create an archive policy – configure retention tags. A retention tag is a data archiving/retention rule that you can apply to specific scopes (entire mailboxes, mailbox folders, etc.). It specifically defines:

  • the action (e.g. archive, delete, permanently delete) to perform on items (emails) such as a mailbox or a mailbox folder; and
  • the age of the item(s) that, when reached, triggers the action on the item(s).

Retention tags do not do anything on their own – they are just the instructions that are executed once you add  a tag to a retention (archive) policy for specific user mailboxes in Microsoft 365.

Now, let’s create our first retention tag. Tip: If you prefer doing things with PowerShell, you can find relevant scripts at the end of each section below, in the ‘PowerShell corner’ subsection.

  1. Sign in to the Microsoft Purview compliance portal with an account belonging to an eligible role group (Global Administrator, Compliance Administrator, Organization Management, etc.).
  2. In the navigation menu, go to Data lifecycle management > Exchange (legacy), select the MRM Retention tags tab, and click New tag – a new retention tag wizard will open.
Creating a new retention tag in the Microsoft Purview compliance portal
  1. First, name you tag (e.g. Auto-archiving (3 years)) and optionally provide its description.
  2. In the Application Method step, decide:
    • what’s the scope you want to apply the tag to (entire users’ mailboxes, specific default folder in those mailboxes, e.g. Sent Items, etc.); and
    • whether a retention action (e.g. archive, delete, etc.) should be applied to emails meeting the tag’s settings automatically or manually.

In our case, we want to automatically archive eligible items (aged 3 years old or more) in each user’s mailbox, so we go for the first option, Automatically to entire mailbox.

Tip: In general, it might be a good idea to create an additional retention tag for which you would choose the third option, By users to items and folders (personal), and specify a shorter age, e.g. 1 year old for emails to be archived. That way, your users would be able to manually archive folders or even single items (emails) quicker, i.e. when they reach the age of 1 year. Since a single archive policy can include multiple rules (retention tags), you can easily select both the tags when configuring the policy in the next section.

Choose the method and scope of retention tag application
  1. The third step, Retention settings, is where you specify what to do with emails that reach a specific age. Note that Exchange Online calculates item age based on the date of delivery. In our example, we want to archive items older than 3 years old, so we enter item age in days (1095 days = 3 years) and choose Move item to archive.
Configure retention settings for a retention tag
  1. In the last step, review your settings and, if everything’s OK, click Submit > Done. Your retention tag has just been created and should appear on the tag list.
PowerShell corner

To configure retention policies with PowerShell, connect to Exchange Online and use the cmdlets listed below:

New-RetentionPolicyTag "Auto-archiving (3 years)" -Type All -RetentionEnabled $true -AgeLimitForRetention 1095 -RetentionAction MoveToArchive

to create a tag named Auto-archiving (3 years) automatically archiving emails which are at least 3 years old.

New-RetentionPolicyTag "Manual archiving (1-year)" -Type Personal -RetentionEnabled $true -AgeLimitForRetention 365 -RetentionAction MoveToArchive

to create a tag named Manual archiving (1-year) letting users manually archive items that are at least 1 year old.

Configure your archiving policy

Now, it’s time to put your retention tag(s) into action. This can be done through configuring an MRM (messaging records management) archive policy. Essentially, there are two approaches you can take:

Use retention tags with the Microsoft 365 default MRM retention policy

The simplest way to ‘activate’ retention tags & start moving old items to a user’s archive mailbox is to update the existing, default Microsoft 365 policy called simply Default MRM Policy.

Here’s how to update the Default MRM Policy:

  1. Go to the MRM Retention policies tab, select the default policy on the list, and click Edit.
Opening the default MRM policy in Microsoft 365 for editing
  1. In the first step of the wizard, click Add tag to move on to adding the tag(s) you’ve just created in the previous section. Tip: If you want to remove the default/existing retention tags from the default policy, use the trashcan icon(s) on the right. Bear in mind that removing a tag that applies to many items in multiple mailboxes might result in a temporary yet significant resource consumption.
Editing retention tags of the default MRM policy in Microsoft 365
  1. In the pane that opens, select your retention tag(s) and click Add – the tag(s) will be added to the policy.
Adding custom retention (archiving) tags to the default MRM policy
  1. Click Next to review your settings and click Submit > Done to apply all changes.

From now on, the policy will be applied to the primary mailbox of each user who has the archive mailbox enabled, using settings from the retention tags you’ve configured. In our example:

  • Users will be able to manually move items older than 1 year to their archive mailbox.
  • Items older than 3 years, regardless of a mailbox folder, will be automatically moved to a user’s archive mailbox.
PowerShell corner

To achieve the same results with PowerShell, run the following cmdlets:

Get-RetentionPolicy -Identity "Default MRM Policy" | Format-List

to list the default policy properties, including the retention tags used by the policy.

Remove-RetentionPolicyTag -Identity "<retention tag name>"

to remove a default/existing retention tag from the default policy (optional). You need to execute the cmdlet separately for each retention tag, replacing <retention tag name> with the actual name of a tag listed by previous cmdlet in the line beginning with RetentionPolicyTagLinks. Again, be careful: removing a tag that applies to many items in multiple mailboxes might result in a temporary yet significant resource consumption.

Set-RetentionPolicy "Default MRM Policy" -RetentionPolicyTagLinks "Auto-archiving (3 years)", "Manual archiving (1-year)"

to add your newly created retention tags to the default MRM policy. If you created just one tag, omit the cmdlet part starting with the comma. If you used different retention tag name(s), modify the names contained within double inverted commas.

(Optional) Speed up the default retention policy propagation across users’ mailboxes

If, after modifying the default policy, you do not take any action, the first application of the policy settings to users’ mailboxes might take up to 7 days. To force the policy application, run the Managed Folder Assistant as follows:

  1. Run PowerShell and connect to Exchange Online, as shown in this article.
  2. Use these two cmdlets to run the Managed Folder Assistant for all user mailboxes in your Microsoft 365 organization:
$Mailboxes = Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox"}
$Mailboxes.Identity | Start-ManagedFolderAssistant

Configure a new MRM archiving policy in Microsoft 365

Creating a completely new MRM archiving policy allows for full personalization but requires additional steps to complete.

First and foremost, only one MRM policy can apply to a user mailbox at a time. That’s why, you will have to assign your newly created policy to end users’ mailboxes to override the default (or any existing) MRM policy in Exchange Online.

Secondly, if you want the policy to also automatically cover users added to your Microsoft 365 organization in the future, you’ll need to set it as the default one.

To create a new policy, proceed as follows:

  1. Go to the MRM Retention policies tab and click New policy.
Creating a new MRM policy in the Microsoft Purview compliance portal
  1. Provide a meaningful name for your policy, click Add tag, select the retention tags (archiving rules) you’ve created that will be activated by the policy, and click Add.
Configure new MRM (archiving) policy settings
  1. Click Next to review your settings and click Submit > Done to apply changes.
PowerShell corner

For the PowerShell-savvy admins, here’s the cmdlet to go with:

New-RetentionPolicy "Auto-archiving policy" -RetentionPolicyTagLinks "Auto-archiving (3 years)", "Manual archiving (1-year)"

If you want to name your policy differently, replace the first value in inverted commas. Similar, if you used different names for your retention tags, replace the last two values in inverted commas. If you created just one tag, omit the cmdlet part starting with the comma.

Assign the new archiving policy to user mailboxes

Now, let’s assign the new policy to users’ mailboxes, replacing for the default/existing MRM policy:

  1. Sign in to the Exchange admin center with an account belonging to an eligible role group (e.g. Global Administrators, Organization Management, Recipient Management, Records Management, etc.).
  2. Go to Recipients > Mailboxes, select all the mailboxes you want to apply the policy to (or click the selector next to Display name to select all mailboxes), and click Mailbox policies.
Accessing the MRM policy assignment settings in the Exchange admin center (EAC)
  1. In the pane that opens, under Retention Policy, select your new archiving policy and click Save to apply your changes.
Assigning the newly-created MRM archiving policy to user mailboxes

From now on, the policy will be applied to users’ primary mailboxes you selected in step 2 above, using settings from the retention tags you’ve configured. In our example:

  • Users will be able to manually move emails older than 1 year to archive mailbox.
  • Emails older than 3 years, regardless of the mailbox folder, will be automatically moved to archive mailbox.

By default, an MRM policy propagation can take up to 7 days. If you want to speed up the process, consult this article’s section.

PowerShell corner

To assign the new MRM policy with PowerShell, use the following cmdlets:

Get-Mailbox -ResultSize unlimited | Set-Mailbox -RetentionPolicy "Auto-archiving policy"

to assign the policy to all mailboxes in your organization. If your policy name is different, replace the value in the inverted commas.

Get-User -Filter "Department -eq '<department name>'" | Set-Mailbox -RetentionPolicy "Auto-archiving policy"

to assign the policy to all users belonging to a given department (based on the Department attribute/property). For that to work, replace <department name> with an actual department name (e.g. Marketing). Again, if your policy name is different, replace the last value in the inverted commas.

(Optional) Set the new policy as the default for your organization

If you don’t want to remember about assigning your archive policy manually each time you add a new user to your Microsoft 365 organization, set the policy as default. You can do this by adding the policy to the mailbox plan – a template that automatically configures mailbox properties:

  1. Run PowerShell and connect to Exchange Online, as shown in this article.
  2. Execute this cmdlet to list mailbox plans in your Exchange Online organization:
Get-MailboxPlan | Format-Table DisplayName,RetentionPolicy,IsDefault
  1. Finally, run this cmdlet to set your archive policy as the default one:
Set-MailboxPlan "<mailbox plan>" -RetentionPolicy "Auto-archiving policy"

replacing <mailbox plan> with the actual name of the plan (returned with the cmdlet from step 2) for which the IsDefault parameter is set to True.

A better alternative to archiving in Exchange Online – CodeTwo backup software

Using the archiving features in Exchange Online is a good way to reduce end users’ mailbox size. It’s worth remembering that archiving doesn’t equal backup. Archive policies are not a perfect solution. Unless you take additional steps, your end users might access archive mailboxes and delete items. What’s more, you need to rely on a third-party cloud storage over which you do not have 100% control. A storage that resides in the same datacenters that the original mailbox data.

To overcome those drawbacks and enjoy additional benefits, such as: compliance with the applicable local laws, full control over important business data, physical access to locally stored backed up information at any time you need, automated & continuous creation of backups, and so on, consider using CodeTwo Backup for Office 365.

Learn more about reasons for backing up your Microsoft 365 data and benefits of using CodeTwo Backup

Tools for Microsoft 365

One thought on “How to set up Microsoft 365 archive policy


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

CodeTwo sp. z o.o. sp. k. is a controller of your personal data.
See our Privacy Policy to learn more.