I did a migration of email accounts from a on-prem Exchange 2013 server to Office 365. The user accounts was synced from on-prem AD with ADFS, and was already in the Office portal before the migration. After the migration, which was done with MigrationWizard from BitTitan, I noticed that even though the tool showed the amount of data migrated and said that everything was migrated without errors, there was no mailboxes in Exchange Online. To fix this I had to check if the mailboxes was created as “Ghosts” or “Shard” mailboxes (Not shared mailbox). I start Powershell and connect to Office 365 and run the command:
Get-MailboxLocation “emailaddress”
If I get this in return, I know that the mailbox is “ghosted” MailboxLocationType : ComponentShared
What I want to get in return is this: MailboxLocationType: Primary
If you open the User Account in the Office 365 Portal and click on E-mail settings you would see 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.”
To fix this I need to delete the mailbox from Office 365 portal, and the only way to do this is by Powershell (If you try to do it in the Office 365 portal you will get the message saying it is synced from on-prem AD and you are not able to delete it)
So in Powershell, connect to Office 365 and remove the User account by running this command:
Get-MsolUser -UserPrincipalName “emailaddress” | Remove-MsolUser -RemoveFromRecycleBin
Now all you have to do is to wait for ADFS to sync the user account from on-prem and when it is synced it will also connect the e-mail account in Exchange Online.
Comments