Connect existing on-premises AD account to Office 365 Mailbox

Modificato il Lun, 9 Nov, 2020 alle 2:46 PM

In a Hybrid environment to create correctly a mailbox you have to do from Exchange On-premises EAC.


Instead, if you have already created a user account, for example, via AD Users & Computers, and then the account was subsequently licensed in the cloud, and given a mailbox (but without the on-premises EAC being aware of it). When you look at the list of mailboxes in the on-premises EAC, one or several accounts are missing. Start by connecting a PowerShell session to Office 365 Exchange Online.

Then run this:

Get-Mailbox user | fl ExchangeGuid

You need to copy this GUID and paste in it later–it has to be matched & input into your on-premises account’s attributes. Open the Exchange management shell on-premises and enter:

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

Set-RemoteMailbox username -ExchangeGuid <ExchangeGuid from above>

This will “hybrid mail-enable” the on-premises account and add the RemoteRoutingAddress (targetAddress attribute), for mail flow and coexistence with Exchange Online. Furthermore, you will have the same GUID on-premises as you do in the cloud to represent that mailbox, which makes it mobile between the environments (so you could pull it back down to on-premises if needed).


NOTE: if Enable-RemoteMailbox give you this error

ExchangeGuid is mandatory on UserMailbox.

Database is mandatory on UserMailbox.


Go to Attributer Editor of the user object, and search msExchHomeServerName

Copy the value just as precaution and clear it.

After a minute execute again the command.

Questo articolo ti è stato utile?

Fantastico!

Grazie per il tuo feedback

Siamo spiacenti di non poterti essere di aiuto

Grazie per il tuo feedback

Facci sapere come possiamo migliorare questo articolo!

Seleziona almeno uno dei motivi
La verifica CAPTCHA è richiesta.

Feedback inviato

Apprezziamo il tuo sforzo e cercheremo di correggere l’articolo