Exchange ServerHow-to

Remote mailboxes in Exchange hybrid: Enable-RemoteMailbox, attributes and common mistakes

Create and manage Exchange Online mailboxes from on-premises the supported way: New- and Enable-RemoteMailbox, the attributes that matter, ExchangeGuid fixes and common mistakes.

In an Exchange hybrid organisation that synchronises users from Active Directory, on-premises Exchange is still where cloud mailboxes are created and where most of their attributes are edited. Get it wrong and you end up with mail that loops, addresses you can't change and mailboxes you can't move. In this post I'll show the supported way to create and manage remote mailboxes, the attributes that make them work, and how to fix the most common mistakes.

Errors this guide fixes

  • 550 5.1.10 "recipient not found"NDR (Exchange Online)
How this guide is organised: How remote mailboxes work → Prerequisites → Step-by-step → Verify → Tips and gotchasFlow diagram of the article's sections in reading order: 1. How remote mailboxes work. 2. Prerequisites. 3. Step-by-step (5 steps: A new user who needs a cloud mailbox; An existing AD user; Synchronise and license; Stamp the ExchangeGuid back on-premises; Make everyday changes in the right place). 4. Verify. 5. Tips and gotchas. Toolbox: Get-RemoteMailbox, Enable-RemoteMailbox, Set-Mailbox, contoso.mail.onmicrosoft.com, msExchRecipientTypeDetails.1How remotemailboxes work2Prerequisites3Step-by-step4Verify5Tips andgotchas1A new user whoneeds a cloud mail…2An existing AD user3Synchronise andlicense4Stamp theExchangeGuid ba…5Make everydaychanges in the rig…TOOLBOXGet-RemoteMailboxEnable-RemoteMailboxSet-Mailboxcontoso.mail.onmicrosoft.commsExchRecipientTypeDetailsHow this guide is organised: How remote mailboxes work → Prerequisites → Step-by-step → Verify → Tips and gotchasFlow diagram of the article's sections in reading order: 1. How remote mailboxes work. 2. Prerequisites. 3. Step-by-step (5 steps: A new user who needs a cloud mailbox; An existing AD user; Synchronise and license; Stamp the ExchangeGuid back on-premises; Make everyday changes in the right place). 4. Verify. 5. Tips and gotchas. Toolbox: Get-RemoteMailbox, Enable-RemoteMailbox, Set-Mailbox, contoso.mail.onmicrosoft.com, msExchRecipientTypeDetails.1How remote mailboxes work2Prerequisites3Step-by-step1A new user who needs a cloud mailbox2An existing AD user3Synchronise and license4Stamp the ExchangeGuid back on-premises5Make everyday changes in the right place4Verify5Tips and gotchasTOOLBOXGet-RemoteMailboxEnable-RemoteMailboxSet-Mailboxcontoso.mail.onmicrosoft.commsExchRecipientTypeDetails
At a glance: how this guide is organised · 5 steps · 5 key settings and tools

How remote mailboxes work#

A remote mailbox is an on-premises mail-enabled user that represents a mailbox in Exchange Online. Active Directory stays the source of authority: you create the object on-premises, directory synchronisation copies it to Microsoft Entra ID, and Exchange Online provisions the mailbox once the user is licensed. On-premises Exchange routes mail for that user to its remote routing address in the tenant's coexistence domain (contoso.mail.onmicrosoft.com), which travels over the hybrid send connector.

These are the Active Directory attributes behind it. Read them with Get-RemoteMailbox rather than editing them by hand.

AttributeTypical valueWhy it matters
msExchRecipientTypeDetails2147483648 (RemoteUserMailbox); 34359738368 shared, 8589934592 room, 17179869184 equipmentTells Exchange Online which kind of mailbox to provision
msExchRemoteRecipientType1 (ProvisionMailbox) for mailboxes created in the cloud, 4 (Migrated) for mailboxes moved from on-premises; 3 or 6 when a cloud archive was provisioned tooShows how the mailbox came to be in the cloud
targetAddressSMTP:sara.ali@contoso.mail.onmicrosoft.comThe RemoteRoutingAddress: where on-premises Exchange sends the user's mail
proxyAddressesMust include smtp:sara.ali@contoso.mail.onmicrosoft.comLets Exchange Online accept mail sent to the routing address
msExchMailboxGuidThe ExchangeGuid; all zeros for a mailbox created in the cloud until you stamp itMust match the cloud mailbox before it can be moved back on-premises

Prerequisites#

  • Hybrid configured with the Hybrid Configuration Wizard (HCW), so the coexistence domain exists as a remote domain and in your email address policy.
  • Directory synchronisation with the Exchange hybrid option enabled.
  • Exchange Server Subscription Edition (SE) or the SE management tools. Exchange 2016 and 2019 reached end of support on 14 October 2025.
  • Recipient management permissions on-premises, and Exchange Online PowerShell V3 for the checks.

Check the routing domain first:

PowerShell
Get-EmailAddressPolicy | Format-List Name, EnabledEmailAddressTemplates
Get-RemoteDomain | Where-Object TargetDeliveryDomain | Format-List Name, DomainName

Good looks like: every policy that applies to cloud users lists smtp:%m@contoso.mail.onmicrosoft.com. The HCW adds it to the default policy only, so check any extra policies yourself.

Step-by-step: create and manage remote mailboxes#

1. A new user who needs a cloud mailbox#

Create the AD account and the remote mailbox in one go, either in the Exchange admin center (Recipients › Mailboxes › New › Office 365 mailbox) or in the Exchange Management Shell:

PowerShell
New-RemoteMailbox -Name "Sara Ali" -FirstName Sara -LastName Ali `
  -UserPrincipalName sara.ali@contoso.com `
  -OnPremisesOrganizationalUnit "contoso.com/Staff" `
  -Password (Read-Host "Initial password" -AsSecureString) -ResetPasswordOnNextLogon $true

2. An existing AD user#

PowerShell
Enable-RemoteMailbox -Identity sara.ali -RemoteRoutingAddress sara.ali@contoso.mail.onmicrosoft.com

Add -Shared, -Room or -Equipment for other mailbox types (-Shared needs Exchange 2016 CU10 or later plus setup.exe /PrepareAD, which any SE organisation already has). To give an existing cloud mailbox an archive, run Enable-RemoteMailbox -Identity sara.ali -Archive.

3. Synchronise and license#

Wait for the next sync cycle or run Start-ADSyncSyncCycle -PolicyType Delta on the Entra Connect server. Then set a usage location and assign a licence that includes Exchange Online (group-based licensing works well). Shared, room and equipment mailboxes normally don't need a licence.

4. Stamp the ExchangeGuid back on-premises#

A mailbox created in the cloud has an empty ExchangeGuid on-premises. Copy the real one across now, so a future move back on-premises doesn't fail:

PowerShell
# Exchange Online PowerShell
Get-Mailbox sara.ali@contoso.com | Format-List ExchangeGuid, ArchiveGuid

# Exchange Management Shell (on-premises)
Set-RemoteMailbox sara.ali -ExchangeGuid "<ExchangeGuid from Exchange Online>"

If the user has a cloud archive, set -ArchiveGuid the same way. Mailboxes migrated with a hybrid move already have matching GUIDs.

5. Make everyday changes in the right place#

ChangeWhereHow
Email addresses, primary SMTP, aliasOn-premisesSet-RemoteMailbox -EmailAddresses, -PrimarySmtpAddress
Display name, hide from address listsOn-premisesSet-RemoteMailbox -DisplayName, -HiddenFromAddressListsEnabled
Convert to a shared mailboxBothSet-Mailbox -Type Shared in Exchange Online, then Set-RemoteMailbox -Type Shared on-premises
Quotas, holds, retention, calendar processing, Full AccessExchange OnlineSet-Mailbox, Set-CalendarProcessing, Add-MailboxPermission

If you try to change a synced attribute in Exchange Online, the command fails with a message saying the object is being synchronised from your on-premises organisation. That is by design: make the change on-premises.

Verify#

PowerShell
# On-premises
Get-RemoteMailbox sara.ali | Format-List RecipientTypeDetails, RemoteRecipientType, RemoteRoutingAddress, ExchangeGuid, EmailAddresses

# Exchange Online
Get-Mailbox sara.ali@contoso.com | Format-List RecipientTypeDetails, IsDirSynced, ExchangeGuid, EmailAddresses

Good looks like:

  • On-premises: RemoteUserMailbox (or RemoteSharedMailbox), ProvisionMailbox or Migrated, and a RemoteRoutingAddress in contoso.mail.onmicrosoft.com.
  • Exchange Online: UserMailbox (or SharedMailbox), IsDirSynced : True, and the coexistence address listed in EmailAddresses.
  • The ExchangeGuid is identical on both sides and isn't all zeros.
  • A test message from an on-premises mailbox arrives, and message trace shows it entering Exchange Online through the hybrid connector.

Tips and gotchas: the common mistakes#

Creating the mailbox in the cloud first#

If you license a synced user who isn't mail-enabled on-premises, Exchange Online creates a mailbox anyway, but on-premises Exchange knows nothing about it. On-premises senders and relaying applications can't reach the user, and you can't edit the addresses from either side without touching raw AD attributes. Fix it by running Enable-RemoteMailbox with the correct RemoteRoutingAddress, then stamping the ExchangeGuid. If the user also has an on-premises mailbox, you now have two mailboxes and mail splits between them; decide which one survives and export data before you remove the other. Microsoft's documented clean-up of the cloud copy uses Set-User -PermanentlyClearPreviousMailboxInfo in Exchange Online, which can't be undone.

The wrong RemoteRoutingAddress#

Pointing it at the primary domain (sara.ali@contoso.com) makes Exchange route the message back to itself until it gives up with a loop NDR. Using the contoso.onmicrosoft.com domain sends mail outside the hybrid connector. Always use the mail.onmicrosoft.com domain:

PowerShell
Set-RemoteMailbox sara.ali -RemoteRoutingAddress sara.ali@contoso.mail.onmicrosoft.com

Missing coexistence proxy address#

Users with EmailAddressPolicyEnabled set to $false don't get the coexistence address automatically, so mail routed to it is rejected by Exchange Online with a 550 5.1.10 "recipient not found" NDR. Add it with Set-RemoteMailbox sara.ali -EmailAddresses @{Add="smtp:sara.ali@contoso.mail.onmicrosoft.com"}.

Using Disable-RemoteMailbox as a reset#

Disable-RemoteMailbox removes the cloud mailbox while keeping the on-premises user. Treat it as a delete, not a repair.

Planning to retire your last server? See removing the last Exchange server in hybrid. For shared mailbox access across environments, see cross-premises permissions.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)