Enabling Exchange Online Archive give error “Primary mailbox is located on an on-premises server”

By Chris Blackburn

So I’m deep in the throws of an Office 365 project, and after going thru the process of setting up Exchange Hybrid with on-premise ADFS, testing mailflow, and performing a mailbox move, the next step was working on Retention Policies to migrate email older than 1 year from their Primary Mailbox with 50gb storage to their Online Archive with 100GB of storage.

I tried to enable the archive from the Exchange Online portal as well as thru Exchange online Powershell but didn’t have any luck. With Powershell I was getting the message:

"Can't enable the archive for user because their primary mailbox is located on an on-premises server. To enable a cloud-based archive mailbox for this user, you must use your on-premises Exchange admin center or Exchange Management Shell."

I found this particularly odd because, well, the mailbox WASN’T on-premises any more nor was there any kind of archive mailbox enabled for my test acount.

After digging for hours (which is typically the catalyst for most of these posts) I came across a solution through the Office 365 community which detailed out adjusting the source AD user’s object on-premises attributes in order for the Archive to come online. Again, since this was a hybrid identity design, on-premises Active Directory was the source of truth and directory synchronization was in place to populate the objects in Azure AD / Office 365.

First, we need to modify the msExchArchiveName attribute to reflect the archive name (this can be whatever we want), as well as modify the msExchRemoteRecipientType to 3.

We’ll leave the msExchRecipientDisplayType and msExchRecipientTypeDetails as is – you can find what these means in a post I made here.

Once completed, force a Dirsync

Once complete, we run the Exchange Online powershell to see that the Get-Mailbox command to see the archive has been created

And that Outlook shows our online archive (with the name that we provided)

 

12 Comments Leave a comment

  1. 2 questions:

    1) Looking at your other post, if I’m moving a mailbox from On-Prem to the cloud then wouldn’t I want the remote recipient type to be 6 since that’s “Migrated mailbox from on-prem, ProvisionedArchive in EXO (mailbox migrated from on-prem & archive provisioned in Cloud)”

    2) Did you find a permanent fix for this problem or do you manually fix it on each affected user?

    • Hey Tom!

      I’ve found that these attributes are missing as well when you don’t provision a mailbox on-premises and move them up to the cloud.

      I’ve used this as a basis to build a Powershell script where, after creating the user in AD Users and Computers, that I populate these fields then perform a Dirsync.

      The users then appear properly in the Cloud and have consistency with the “source of truth”: on-premises Active Directory.

      I know, not the answer we want but hopefully long term we’ll see something that fits well with a Synchronized / Federated identity models.

  2. Hi,

    Thank you for your post.
    Now fun fact, when changing those attributes, Exchange Online creates a local archive and not an archive in the cloud.

    Is there a possibility that a Exchange Online Archive is created instead of an OnPremise Exchange Archive?

  3. Hi,

    I moved my mailbox from Exchange 2010 SP3 on premise to office 365 too. Got the same message. But solution is simple. Just go to your Exchange management shell on premise. Go to recipient configuration – Mail contact which contains a complete list of on premise mailboxes and office 365 mailboxes. Search your own mailbox which has another icon as on premises mailboxes.
    Just right click – Enable hosted Archive. Force start your Azure connect in the scheduled tasks (AD sync Scheduler task) of your AD connect server and you will see your online archive within a few minutes. Logon to Outlook again and you will see your online archive.

    • You make it sound too easy haha 😉 I have a few environments I help manage that actually have NO exchange install whatsoever after their Hybrid migration, so I needed an AD-only alternative.
      But yes – the GUI way is certainly doable as well!

  4. Chris,

    If the customer has the resources, I would recommend standing up an Exchange 2013/2016 Management Server, using the free license of course. It can be used to manage the attributes for AD Sync environments.

    Archive
    •Open EAC/recipients/mailboxes

    •Click on the mailbox

    •In the results pane click “Enable” under In-Place Archive, and then click “yes”

    •Wait for Azure Active Directory Sync to run or force a synchronization

    In Bulk (Run this cmdlet from the mgmt server)

    •Get-RemoteMailbox –ResultSize unlimited –Filter {(RecipientTypeDetails –eq ‘RemoteUserMailbox’)} | Enable-RemoteMailbox –Archive

    •Allow for two Azure AD Synch’s to occur (or force to manual sync’s)

    • Chris Blackburn May 25, 2016 at 9:12 am Reply

      Excellent point as well – we’ve actually be recommending to customers to utilize the free license (which can be retrieved at https://configure.office.com/Scenario.aspx?sid=13) for a Hybrid Management Server, encompassing Exchange 2016, AD Connect, and the Remote Server Administration tools. This way, a large number of tasks can be automated, from a single AD users changes and AADSYNC synchronization jobs, by a single Powershell cmdlet.

  5. I was able to do this using 2 methods

    Using the GUI on my exchange 2013 hybrid servers

    or using PS on the hybrid servers

    Enable-RemoteMailbox -Archive

    • I won’t lie, this article is somewhat dated after Microsoft has included this within the GUI of Exchange/Exchange Online!

  6. When i try to do this online under enable archive, i get the same message that i have to use on premise exchange/shell. We moved our mailboxes and then decommissioned our exchange server. can you give me a little more detail about how and where you are editing these properties?

Share your thoughts

css.php