In this scenario, an on-premise AD user was created and synced with Microsoft 365. The Microsoft 365 user has an Exchange Online mailbox, but this mailbox is not visible in the on-premise Exchange Admin Center.
Obtain the GUID of the Exchange Online Mailbox
Open PowerShell and connect to Exchange Online.
Get-Mailboxcommand to obtain the GUID of the user's existing mailbox in Exchange Online. Save the GUID for use in the next section.
Get-Mailbox jdoe | Format-List ExchangeGuid ExchangeGuid : < ExchangeGuid >
Update the On-Premise Exchange Environment
Open Exchange Management Shell on the on-premise Exchange server.
Enable-RemoteMailboxcommand to mail-enable the on-premise user. The
-RemoteRoutingAddressparameter value will be the user's @<tenant>.mail.onmicrosoft.com SMTP address.
Enable-RemoteMailbox jdoe -RemoteRoutingAddress email@example.com Name RecipientTypeDetails RemoteRecipientType ---- -------------------- ------------------- John Doe RemoteUserMailbox ProvisionMailbox
Set-RemoteMailboxcommand to update the GUID of the on-premise mailbox to match the GUID of the mailbox in Exchange Online. Use the value obtained in Step 2 of the last section.
Set-RemoteMailbox jdoe -ExchangeGuid <ExchangeGuid>