During a Microsoft Office 365 Exchange migration creating new users can be a little bit of a challenge. If done wrong the user will end up with a mailbox that either internal or external users to the domain cannot communicate with.  

When the MSOnline license is applied for the mail user a mailbox is created.  If the user mailbox was not created in Exchange first, none of the mail attributes will synchronize and Exchange Online won’t know where to correctly route mail for the user.

Step 1: Create User Account in AD
Step 2: Create Mailbox in On-Premises Exchange
Step 3: After AD Sync has completed after new user account was created apply Microsoft Office 365 License
Step 4: Migrate Mailbox from On-Premises Exchange to Office 365 Exchange Online

Should you end up in a situation where this was done incorrectly, the only option is to use PowerShell to remove the Office 365 user account.

  1. Ensure local Exchange mailbox has been created for the user
  2. Connect to Office 365 tenant using Azure Active Directory Module for Windows PowerShell
  3. Remove the user from Office 365 Tenant
  4. Remove the user from Office 365 Tenant Recycle Bin
  5. Manually push a sync
  6. Apply Microsoft Office 365 License to user account

Connect-MsolService

Remove-MsolUser -UserPrincipalName user.name@example.com

Remove-MsolUser -UserPrincipalName user.name@example.com -RemoveFromRecycleBin -Force

Start-AdSyncSyncCycle -PolicyType Delta

Monitor the Exchange Online Recipients to ensure no new mailbox is created for the user after the Delta sync has completed.  If no mailbox is created, the user will appear under the Contacts as a Mail User and remain there until the migration of the mailbox to Office 365 is completed.