We are in the middle of hybrid coexistence migration from Exchange 2010 on-premise to Office 365. That means we have ADFS and "Dirsync" (now called Windows Azure AD Sync) running. We are more than halfway through migrating mailbox, so about 60% of our users' mailboxes are in the cloud and the remaining 40% or so are still in on-premise Exchange 2010 databases.
Today we discovered that one of our users has both an on-premise and an Office 365 mailbox linked to his one AD account. That means that if he opens Outlook on a domain-joined computer and goes through the initial configuration, it uses autodiscover to connect him to his on-premise mailbox, but if he logs on to the Office 365 portal, it shows his cloud mailbox.
Even worse, when a user whose mailbox is in the cloud sends him an e-mail, it goes only to his cloud mailbox, and when a user whose mailbox is still on-premise, it goes only to his on-premise mailbox. So he can't see all his mail all in one place.
How can we "merge" his mail data (final destination: Office 365) and make sure his Outlook "autodiscovers" the Office 365 mailbox and all mail is routed to that mailbox?
I've the same problem in my domain. Someone manually create the o365 mailbox for users who already have an on-premise mailbox
I've found this way to fix it:
Remove-MsolUser -UserPrincipalName [email protected] -Force
Remove-MsolUser -UserPrincipalName [email protected] -RemoveFromRecycleBin -Force
I think is more simple and straightforward. You can also re-migrate your mailbox on-prem (offboarding) if you need it.
I decided I didn't want to export all the mail from the cloud mailbox using Outlook, remove the Office 365 license (or just the EOL license) from the user, then use Powershell to permanently delete the mailbox, then migrate the on-premise mailbox to the cloud, and then re-import the exported data to the new cloud mailbox. I knew that would work but seemed to roundabout. What I ended up doing might have been more so, but here's another way:
<user alias>@<our custom domain>.mail.onmicrosoft.com
.Once the Mail User object was sorted out, I figured I had several things to adjust in Active Directory attributes:
<user alias>@<our custom domain>.mail.onmicrosoft.com
.-2147483642
.2147483648
.4
.Get-Mailbox -Identity <alias> | fl
. The trick is when it's reported there, it is in text format and to edit the AD attritube one must enter it in hex format. I used an online converter (there are several, which I found out after doing a web search on the format mismatch) to get the hex version and updated the AD attribute.An anonymous user suggested the following, instead of using the GUID converter. This also would allow Powershell automation of the process.
Thanks Mauro! It worked for me, U had to add
-UserPrincipalName
to your command and it worked for me!To get rid of the cloud mailbox I simply changed from one subscription to another so IE I was on E5, I changed my account to Business Premium but removed Exchange Online option, I then migrated my mailbox to the cloud before changing back to E5 subscription.