How to add an Exchange Online license to a mailbox in Exchange Hybrid? You have…
Office 365 mailbox not showing in Exchange Hybrid on-premises
An Exchange Hybrid configuration is set up in the organization. When you look in the on-premises Exchange admin center, the Office 365 mailbox is not showing. The mailbox shows only in Office 365. Why is this happening, and what is the solution for Office 365 mailbox not showing in Exchange Hybrid on-premises?
Table of contents
Check mailbox in Exchange Online and Exchange on-premises
There is an Office 365 mailbox when you look in Microsoft 365 Exchange admin center. In our example, the user mailbox is Alison Bell with the email address Alison.Bell@exoip.com.
When you check the on-premises Exchange admin center, the mailbox doesn’t show up. Even a search will not show you the mailbox.
Let’s try to find the mailbox with PowerShell. Start Exchange Management Shell as administrator. Run Get-RemoteMailbox cmdlet. You will get the output that the object couldn’t be found.
[PS] C:\>Get-RemoteMailbox -Identity "Alison.Bell@exoip.com"
The operation couldn't be performed because object 'Alison.Bell@exoip.com' couldn't be found on
'DC01-2016.exoip.local'.
+ CategoryInfo : NotSpecified: (:) [Get-RemoteMailbox], ManagementObjectNotFoundException
+ FullyQualifiedErrorId : [Server=EX01-2016,RequestId=ac7b9c98-6913-4c83-a35c-4351e7308fe4,TimeStamp=6/21/2021 9:2
5:50 PM] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] 1B6A5890,Microsoft.Exchange.Management.Recipie
ntTasks.GetRemoteMailbox
+ PSComputerName : ex01-2016.exoip.local
Why is this happening, and what is the solution for Office 365 mailbox not showing in Exchange Hybrid on-premises?
Why Office 365 mailbox is not showing in Exchange admin center
The Office 365 mailbox does not show up in Exchange on-premises because:
- You create an on-premises Active Directory user account and assign a license to the mailbox without the Enable-RemoteMailbox cmdlet.
- You create an on-premises Active Directory user account and create the mailbox in Office 365 (cloud) without the Enable-RemoteMailbox cmdlet.
Let’s look at how to fix the Office 365 mailbox not showing in Exchange on-premises.
Solution for Office 365 mailbox not showing in Exchange admin center
Run Exchange Management Shell as administrator and run the following three cmdlets.
Step 1. Run Enable-MailUser cmdlet to mail-enable the user that isn’t already mail-enabled (Exchange on-premises).
[PS] C:\>Enable-MailUser -Identity "Alison.Bell@exoip.com" -ExternalEmailAddress "Alison.Bell@exoip365.mail.onmicrosoft.com"
Name RecipientType
---- -------------
Alison Bell MailUser
Do you get an error after running the above cmdlet? Read the article ExchangeGuid is mandatory on UserMailbox.
Step 2. Run Enable-RemoteMailbox cmdlet to link the cloud mailbox in the cloud-based service for the existing user in the on-premises Active Directory (Exchange on-premises).
[PS] C:\>Enable-RemoteMailbox "Alison.Bell@exoip.com"
Name RecipientTypeDetails RemoteRecipientType
---- -------------------- -------------------
Alison Bell RemoteUserMailbox ProvisionMailbox
Step 3. Connect to Exchange Online PowerShell and run Get-Mailbox cmdlet to get the ExchangeGuid property and copy the value (Exchange Online).
PS C:\> Connect-ExchangeOnline
PS C:\> Get-Mailbox "Alison.Bell@exoip.com" | ft Identity,ExchangeGuid
Identity ExchangeGuid
-------- ------------
Alison Bell 8a3a004c-131a-4914-8951-cb41f50fe024
Step 4. Run Set-RemoteMailbox cmdlet to set the ExchangeGuid property on the AD on-premises user object (Exchange on-premises).
[PS] C:\>Set-RemoteMailbox "Alison.Bell@exoip.com" -ExchangeGuid "8a3a004c-131a-4914-8951-cb41f50fe024"
Step 5. Run Get-RemoteMailbox cmdlet and verify that the ExchangeGuid is set on the on-premises AD user object (Exchange on-premises).
[PS] C:\>Get-RemoteMailbox "Alison.Bell@exoip.com" | fl Identity,ExchangeGuid
Identity : exoip.local/Company/Users/HR/Alison Bell
ExchangeGuid : 8a3a004c-131a-4914-8951-cb41f50fe024
Step 6. Force sync Azure AD Connect with PowerShell.
PS C:\> Start-ADSyncSyncCycle -PolicyType Delta
Verify Office 365 mailbox showing in Exchange on-premises
Check in the on-premises Exchange admin center that the Office 365 mailbox shows up.
Another check, but this time in Exchange Management Shell. Run Get-RemoteMailbox cmdlet.
[PS] C:\>Get-RemoteMailbox -Identity "Alison.Bell@exoip.com"
Name RecipientTypeDetails RemoteRecipientType
---- -------------------- -------------------
Alison Bell RemoteUserMailbox ProvisionMailbox
Everything looks great!
Read more: Create Office 365 mailbox in Exchange Hybrid »
Conclusion
You learned why the Office 365 mailbox is not showing in Exchange Hybrid on-premises. The solution to this problem is to run both the Enable-MailUser and Enable-RemoteMailbox cmdlets against the on-premises Active Directory user. After that, the Office 365 mailbox shows up in the on-premises Exchange Server.
Did you enjoy this article? You may also like the course Exchange Hybrid. Don’t forget to follow us and share this article.
Hi Ali,
Thank you very much for all the work you do. I have a question regarding this. In my situation i have fixed it for one user. I want to as if i have 100 for exaple. Is there a way to do it for multiple users. Is re-runnung the Hybrid configuration wizzrds going to fix the missing attributes ?
Thank you.
My problem is that we are in hybrid. Account originally created in on-premise then migrated to O365. Sync via Azure AD Sync. After we took this account of sync it turns out as deleted. Then we resync it again, restore it from delete, asign a licence but the mailbox is missing. It is not shown in Exchange Online. Non of this above worked. It is not for our problem. Ali please, can you help?
Someone asked about a shared mailbox here, the simple solution is to convert the shared mailbox to regular user mailbox then follow these instructions. Then follow the instructions to convert to shared correctly.
https://www.alitajran.com/convert-user-mailbox-to-shared-mailbox-exchange-hybrid/
Thx Ali
You are a legend ; God knows how often I refer to your articles.
Thank you very much, Ali – I come back to your articles time and again, and I appreciate the information you provide.
Can you please tell me if there is any impact to the existing mailbox when this is done – e.g. will they still be able to access their mailbox while this work is being done?
Thank you
There will be no impact.
Thank you, this worked for us.
Is there a way to have this happen automatically when we create a new mailbox in O365? Or do we have to do this for ever new user if we synch the AD account and then create the mailbox by assigning a license on O365?
Seems to be a lot of work to have a local mail enabled box show up, and before discovering this issue, I assumed all of this would happen automatically since we are still in hybrid mode.
You have to create the Office 365/Microsoft 365 mailboxes from on-premises, so this will not happen.
Read the articles:
– Create Office 365 mailbox in Exchange Hybrid
– Create Office 365 shared mailbox in Exchange Hybrid
– Create Office 365 resource mailbox in Exchange Hybrid
Thank you. I just realized that when we first migrated over this past summer, we were using the on prem server to create O365 mailboxes, and those all work fine, but at some point, we just started creating O365 mailboxes by assigning Exchange Online licenses. We never realized that meant the user didn’t have a mail object created in the on prem server.
Thank you for the reply and this article as it has been very helpful to understand this.
Nice, work perfect
Thank you as always Ali – worked perfectly for me.
Thank you Ali. I keep coming back to this article whenever I need to. Quick question, was Step 3 (setting GUID) added later to this article? I don’t remember seeing this step before. What does setting the GUID do and why do I need it?
Yes, it was added later.
You need it when you want to move the Exchange Online mailbox back to Exchange on-premises. If the mailbox GUID is not set for the on-premises mailbox identical to the Exchange Online mailbox, you will get an error when migrating.
More information about it is in the article Cannot find a recipient that has mailbox GUID.
Would there be a way to do this in bulk for multiple users?
looking for the same. Have multiple users as well 🙂
Thanks !! solved my problem…..
Kind regards,
Frank
Does anyone have a script to map all Exchange Online mailbox GUID and enable on premise Active Directory accounts as RemoteMailbox and apply Exchange GUID? Thanks!
Great article Ali. In the event mailbox was created directly in EXO/O365 without an AD object, any good solution for this other than delete EXO object and re-create EX object correctly?
I have written about this in the article Sync Azure AD user to on-premises AD.
Great article, thank you very much Ali!
I should add to my last comment:
Enable-Mailuser says it is already of type MailUser
Enable-RemoteMailbox says “Specified argument was out of the range of valid values”
I can get the Guid just fine
set-remotemailbox says the mailbox cannot be found on the domain controller
But the user is in AD and the mailbox is in Office 365, but not in on-prem Exchange.
So, in my case, when I use the enable-mailuser command, it tells me the account is of type MailUser already, but it still does not show up in on-Prem Exchange.
Can not stress enough how incredible helpful your site/entries are. Thanks!
Thanks, worked like a charm!
This works great for regular mailboxes, thank you!
How would we update Distribution group, Shared Mailbox and Room Mailbox attributes created before we had a Exchange 2016 Management Server to have them show in Exchange 2016 Admin Center?
This is the best and simple article explained. Kudos Man
After searching for about an hour to no success, this worked perfectly. Thanks Ali
This is fab, been messing around removing licenses, un/re syncing etc. So much simpler.
This blog was a life saver. Thanks for posting!
Muchas gracias, era lo que me faltaba!
Excellent article Ali, worked like a charm! Thank you so much!
This was very helpful, thanks so much!
Thanks for the very clear instructions and we were able to resolve this same issue.