Remote Mailboxes in Exchange Hybrid configuration

I’ve been asked a few questions recently about Remote Mailboxes in Office 365 hybrid configurations. The Remote Mailbox exists on the On Premise Exchange server and is the link between the Office 365 mailbox and the On Prem Exchange Organisation. Without one of these for each Office 365 mailbox, you can’t effectively manage certain Office 365 mailbox properties, you can’t offboard it back to the On Prem Exchange Server, and most importantly, not having a Remote Mailbox breaks mail flow between users On Prem and users in Office 365.

Quite often, when administrators first start using Office 365 in Hybrid mode, they will create a new user simply by creating the AD account, synchronising it using DirSync/AADSync, and then licensing the user. This will give you a mailbox in Office 365, but will also cause the problems listed above. The correct way to provision new users in Office 365 is to create new Remote Mailboxes. If a Remote Mailbox isn’t present or has been accidentally deleted, you can create one and link it up to the Office 365 mailbox.

To do this:

From Exchange Management Shell (On Premise):

Enable-RemoteMailbox username –RemoteRoutingAddress alias@domain.mail.onmicrosoft.com

The RemoteRoutingAddress is always in the format of alias@domain.mail.onmicrosoft.com, for example:

Enable-RemoteMailbox joeb –RemoteRoutingAddress joeb@doubledit.mail.onmicrosoft.com

You then need to get the Mailbox GUID of the Office 365 mailbox. To do this, go into Office 365 PowerShell and run:

Get-Mailbox –Identity emailaddress | fl Identity,ExchangeGUID

Copy the Mailbox GUID into your clipboard and go back to the Exchange Management Shell (On Premise):

Set-RemoteMailbox username –ExchangeGUID 8e992097-24c1-432c-8a89-98e3c7a7d283

Anything in italics needs to be changed to a parameter relevant to your requirements. Once you’ve completed this, perform a delta/incremental sync and the two shall become one (so to speak!)

There is a KB article from Microsoft on a similar issue (trying to Offboard a mailbox where the Remote Mailbox GUID is not the same as the 365 GUID) here: http://support.microsoft.com/kb/2956029/en-us

Thanks for reading 🙂

6 thoughts on “Remote Mailboxes in Exchange Hybrid configuration

  1. Nicolas says:

    This saved me a lot of time, really!

    In my scenario (i’m new to Office365, with an on-premises Exchange 2010 SP3), I Just moved a mailbox via Remote Move Request. After that the communication just broke and routing loops appeared.

    Your post helped me to check in the remote mailbox properties of the user and find that the routing email-address stayed the same as the local addressing policy defined (domain.com instead of domain.mail.onmicrosoft.com).

    My question is, which one is the right way to migrate mailbox and prevent this problem?

    Thank you!

    Like

    • Hi there,

      Thanks for your feedback 🙂 It is best to start the mailbox migrations from the Office 365 admin portal, rather than the On Premises environment, however that doesn’t sound like the solution to your problem.

      The routing address should be set using your Email Address Policies in Exchange 2010 (the Hybrid Configuration wizard will add these for you). If the mailbox you are trying to move does not have the ‘automatically update based on email address policy’ option ticked, then you will not get a routing address set and will encounter problems. Check your email address policy (should have %g@domain.mail.onmicrosoft.com in it) and whether your users are set to automatically update based on that policy.

      Hope this helps,
      DD

      Like

  2. Matthew says:

    Thank you very much. I am just experimenting with Office365 and had originally setup remote mailboxes on our On prem, for some reason the Exchange GUID of the on prem account had change. I really don’t know why. Hopefully it is only a one off.

    Like

  3. khun says:

    Hi
    Remote user mailbox is showing in Mail contact of Exchange 2010 console’s recipient configuration after all mailbox is migrated to O365.
    All mail flow are working fine
    Is it normal. Since On Prem Exchange is going to do decommisison soon.

    Like

  4. Jose Arias says:

    When you have a hybrid environment, the best practice is to create the mailbox in the local Exchnage environment and through an Office 365 migration process, take it to Microsoft office 365,

    Like

Leave a comment