Office 365 on-premises

By | April 22, 2015

Warning user’s on-premises mailbox hasn’t been migrated to Exchange Online

I have been working with Office 365 for the last three days.  This error provided hours of enjoyment.

Warning

There is no on-premise exchange server.  So WTF!

After many hours of troubleshooting I have a resolution.

Remove the synchronization of the attribute msExchMailboxGuid to Office 365

We first need to alter the directory synchronization behavior for all AD mailboxes

  1. Open Explorer
  2. Navigate to C:Program FilesMicrosoft Online Directory SyncSYNCBUSUIShell
  3. Launch miisclient.exe
  4. Click on the Management Agents tab at the top
  5. Right-click on the Windows Azure Active Directory Connector and select Properties
  6. Click on Configure Attribute Flow from the navigation pane
  7. Expand the node Object Type: user within the Configure Attribute Flow section
  8. Locate and select the mapping for the attribute msExchMailboxGuid
  9. Click the Delete button which will remove the selected mapping
  10. Click OK to save the changes

Remove the account from office 365

  1. Remove the license from the user
  2. Disable Azure Directory Sync
  3. Download Windows Azure Active Directory Module for Windows PowerShell
  4. Open the powershell: Windows Azure Active Directory Module for Windows PowerShell
  5. Type:
     Connect-MsolService – then enter your O365 login information.
     Get-msoluser –userPrincipalName [email of user] – this shows you that they exist, if true continue
  6. Remove-msoluser –userPrincipalName [email]
  7. Type Yes
  8. Remove-msoluser –userPrincipalName [email] –removeFromRecycleBin
  9. Type Yes
  10. Enable Azure Directory Sync
  11. Wait 30 minutes

Add the user back

  1. Confirmed the user has been created
  2. Assigned a license to the user
  3. Make sure that you DON’T get the message: “This user’s on-premises mailbox hasn’t been migrated to Exchange Online. The Exchange Online mailbox will be available after migration is completed. Learn more about email migration”
  4. Confirm that the mailbox has been created

As soon as the mailbox show the correct email address I was jumping for joy.