Menu Close

[SOLVED] Emails Not Moving To Archive In Office 365

The strategies in this post will help move emails to a cloud archive mailbox.

Archive mailboxes allow for additional storage of users’ email messages. However, in some scenarios, emails not moving to archive in Microsoft 365. This is because of various reasons.

Let’s dive right into our findings.

Archive Status

In a hybrid environment, check the status of the archive mailbox where the user account is synced from on-premises and the archive mailbox exists in Microsoft 365. You should use both of the following properties to confirm the status of the archive in on-premises and cloud.

  • ArchiveGuid
  • DisabledArchiveGuid

Run the following cmdlet in on-premises PowerShell:

Get-RemoteMailbox UserName | FL ArchiveGuid,DisabledArchiveGuid

Run the following cmdlet in Exchange Online PowerShell:

Get-Mailbox UserName | FL ArchiveGuid,DisabledArchiveGuid

The output of the above commands should be the same. If they do not match, correct them. In my case, both are the same.

Retention Policy

  • The 2 years retention policy applied to the mailbox. It will move emails older than 2 years from the user mailbox to the cloud archive mailbox.
  • To verify that you have applied the retention policy, run the following cmdlet in Microsoft 365 to retrieve the retention policy for the mailbox.

Get-Mailbox UserName | FL RetentionPolicy

To apply a retention policy to a single mailbox using the portal:

  • Access Exchange admin center
  • Go to Recipients > Mailboxes.
  • In the list view, select the mailbox to which you want to apply the retention policy.
  • Click Mailbox features.
  • In the Retention policy list, select the policy you want to apply to the mailbox, and then click Save.

To apply a retention policy to a single mailbox using PowerShell:

Set-Mailbox UserName -RetentionPolicy “PolicyName”

Emails not moving to archive mailbox

  • After you create the retention policy, the policy doesn’t automatically run. However, you can manually run the below cmdlet every time that you want to move messages to the archive.

Start-ManagedFolderAssistant –Identity <UserName>

  • The Managed Folder Assistant uses the retention policy settings of users’ mailboxes to process the retention of items. This mailbox processing occurs automatically. You can use the Start-ManagedFolderAssistant cmdlet to immediately start processing the specified mailbox.
  • You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they’re not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.

Tip1:

  • If you get an issue where the invocation of the managed folder assistance is failing with a generic RPC error, “The call to Mailbox Assistance Service on server: ‘NAME’ failed. Error from RPC is –2147220989”.
  • When this error is encountered, subsequent retries of the same command can be successful. The error can sometimes occur as portions of mailboxes are being initialized within the service. For example, if a secondary archive is being provisioned off a main archive. As a potential workaround to this issue, the primary mailbox GUID can be specified in the start-ManagedFolderAssistant command.

Get-Mailbox UserName | FL ExchangeGUID

  • Using this mailbox GUID, we can invoke managed folder assistance.

Start-ManagedFolderAssistant aace1f4e-5181-4855-a0c7-466f1fe2f1d1

  • When utilizing the GUID, we can minimize the chance that any initialization process will cause the command to fail.
  • After executing the Managed Folder Assistant, emails will be moved from the primary mailbox to the cloud archive mailbox. It will take a minimum of one day to process. In some cases, it may take longer than 24 hours to move emails.

Tip2:

MRM (Messaging Records Management) is a slow process, and it takes its own time to process mailboxes. However, you can use the below command to trigger the MRM more often. You can modify the seconds as you wish. In my case, I set it to 30 minutes.

while($true)
{
start-managedfolderassistant user@domain.com
write-host “waiting”; start-sleep -seconds 1800;
}

How do I check the email movement status?

  • This cmdlet is really intended to validate that all is well within a mailbox but it does return some interesting information about MFA, grouped together with an Elc* (email lifecycle) prefix. You generate a mailbox diagnostic log for a specific user as follows:

Export-MailboxDiagnosticLogs –Identity UserName -ExtendedProperties

  • You can find the following fields in the output.
FieldMeaning
ElcLastRunTotalProcessingTime The total time (in milliseconds) that the Managed Folder Assistant spent processing the mailbox in its last run.
ElcLastRunSubAssistantProcessingTime The total time (in milliseconds) that the ELCTagSubAssistant (the part of MFA that handles item tagging and expiration). Only time spent processing items in the IPM folder tree is calculated. Time spent processing items in the Recoverable Items folder structure (dumpster) is ignored.
ElcLastRunUpdatedFolderCountThe number of folders that were updated by MFA in its last run.
ElcLastRunTaggedFolderCountThe number of folders tagged (or untagged) by MFA in its last run.
ElcLastRunUpdatedItemCountThe number of individual items that were tagged (or untagged) by MFA in its last run.
ElcLastRunTaggedWithArchiveItemCountThe number of items that MFA updated with an archive tag in its last run.
ElcLastRunTaggedWithExpiryItemCountThe number of items that MFA updated with an expiry (delete) tag in its last run.
ElcLastRunDeletedFromRootItemCountThe number of items MFA deleted from the IPM folder tree in its last run.
ElcLastRynDeletedFromDumpsterItemCountThe number of items MFA deleted from the Recoverable Items folder structure in its last run.
ElcLastRunArchivedFromDumpsterItemCountThe number of items MFA moved from the Recoverable Items folder structure to the archive mailbox in its last run.
ElcLastRunArchivedFromRootItemCountThe number of items MFA moved from the IPM folder tree into the archive mailbox in its last run.
ElcLastRunSuccessTimeStampThe last time MFA successfully finished processing a mailbox.
  • Now that you have this, you can look through the properties to find values that would be helpful for determining the last pass of the managed folder assistant.
  • The value we’re looking for is ElcLastSuccessTimeStamp. The ElcLastSuccessTimeStamp is only stamped once the managed folder assistant has run.
  • For Exchange Online, the Managed Folder Assistant only processes mailboxes that are larger than 10 MB.

Auto-Expanding Archive

  • You can use the Exchange Online auto-expanding archiving feature to enable unlimited storage space for archive mailboxes.
  • When auto-expanding archiving is turned on, additional storage space is automatically added to a user’s archive mailbox when it approaches the storage limit.
  • The result is unlimited mailbox storage capacity. You can turn on auto-expanding archiving for everyone in your organization or just for specific users.

Before adding the auto-expanding:

After adding the auto-expanding:

  • To verify that auto-expanding archiving is enabled for your organization, run the following command in Exchange Online PowerShell:

Get-OrganizationConfig | FL AutoExpandingArchiveEnabled

  • A value of True indicates that auto-expanding archiving is enabled for the organization. To verify that auto-expanding archiving is enabled for a specific user, run the following command in Exchange Online PowerShell.

Get-Mailbox UserName | FL AutoExpandingArchiveEnabled

  • If you would like to enable this feature per mailbox, you can use the following command:

Enable-Mailbox UserName -AutoExpandingArchive

Also read: How to fix Office 365 Online Archive Pending status in a hybrid environment?

That’s how I fixed emails not moving to archive issue.

Now I’d like to hear from you:

Which finding from today’s report did you find most interesting? Or maybe you have a question about something that I covered.

Either way, I’d like to hear from you. So go ahead and leave a comment below.

Related Posts

3 Comments

  1. Tyler

    Thank you for this post! I was wondering if you had any insight into this error:
    Start-ManagedFolderAssistant -Identity username
    WARNING: The User ‘username’ Archive mailbox is offline.
    I did notice the guids were different on this account, but I fixed it on AD to match. I ran a sync, but still getting the error.

    • techieberry

      Hi, I assume it’s hybrid environment. Can you compare the archive and mailbox guid settings between on-premises and cloud, just to make sure they are same?. If they are correct, execute the same command but try with Exchange GUID and not username and see how it goes.

  2. SOSiDB

    Thank you!! Just ran into the issue when I tried to use Start-ManagedFolderAssistant for recently created archives. Normally, I would run it using the mailbox alias, but for newly created mailbox archives, I now have to use the ExchangeGuid for those with Start-ManagedFolderAssistant. Old ones still work with the alias, but not the newer archives.

Leave a Reply

Your email address will not be published. Required fields are marked *