Troubleshooting Office 365 IMAP Migrations from Google Apps
We usually use Skykick for our Office 365 migrations as it helps us to automate the process and ensures a seamless transition onto Exchange Online. Occasionally Skykick will be unavailable to us, which is the case for a small migration I have underway.
The customer is migrating away from a Google Apps tenant that we don’t have administrative access to. This means we’re unable to set up the Google Service Account required by SkyKick, and have to migrate mail, contacts and calendars separately onto Office 365.
Since we have the usernames and passwords for the Google Apps/Google for Work accounts, we can run an IMAP migration within the Exchange Admin Centre. There are some instructions here that detail this process.
If the stars align for you, the migration will run without an issue. Though just in case things go wrong, here’s some solutions to some common IMAP migration issues.
Error: We had trouble signing into this account. Please confirm that you’re using the correct username and password.
If you’re receiving this error message and you’re 100% sure that all user details are correct, you may need to Allow less secure apps in the users’ Google Security Settings.
To do this, log on as the user to: https://myaccount.google.com/security?pli=1#signin
If Allow less secure apps is set to OFF, set it to ON.
This will allow Office 365 to connect to your accounts via IMAP to download the mail.
E-mail migration batch “migrationname” has finished – with errors
If you try to run the migration again, you will probably get an error report via email that states E-mail migration batch “migrationname” has finished – with errors.
The error message tells you that the migration users already exist, and will need to be removed before we can migrate their mail. The usual method to do this would be to delete the Migration Batch from the Exchange Admin Center.
When attempting to delete the migration, you may notice that the migration is stuck with a status of Removing.
Removing a Migration Batch via PowerShell
To remove a Migration Batch that is stuck with a status of removing, you may need to remove it via PowerShell.
To do this, you’ll need to connect to Exchange Online via PowerShell. See our quick guide if you’re not sure how to do this.
You’ll get a list of the current Migration Batches. In my screenshot the status is Syncing, since I forgot to take a screenshot while it was stuck on Removing.
To remove a Migration that’s stuck on Removing or Corrupted, run Remove-MigrationBatch -Identity migrationname
Remember to replace name with the name of your migration.
If it still does not remove, run Remove-MigrationBatch -Identity migrationname -Force to force it’s removal.
The user “firstname.lastname@example.org” already exists, but the migration batch that includes it couldn’t be found
Unfortunately, if you try to run the migration again, you may get the following error in your emailed error report:
The user “email@example.com” already exists, but the migration batch that includes it couldn’t be found. Before you try migrating the user within a batch again, please remove the existing user by running the Remove-MigrationUser cmdlet.
At first I tried to remove all the migration users by signing into Exchange Online via PowerShell and running Get-MigrationUser to get a list of all the current migration users.
Then I ran Get-MigrationUser | Remove-MigrationUser
This gave me the following error message for each one:
Could not load the batch information for migration user ’firstname.lastname@example.org’. Associated migration subscription cannot be removed
To fix this, run Get-MigrationUser | Remove-MigrationUser -Force
You can run Get-MigrationUser again to confirm that there are no more registered Migration Users
Save yourself some time
If you want to save some time and force the removal of both Migration Batches and Migration Users, just run the following PowerShell commands in order:
Remember to replace migrationname with the name of your migration batch.
Remove-MigrationBatch -Identity migrationname -Force
Get-MigrationUser | Remove-MigrationUser -Force
Now, try to run the migration again and it should proceed without an issue.