Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Dear ALBETTA INTERNATIONAL LTD,
Good day! Thank you for posting to Microsoft Community. We are happy to help you.
I understand that you have a concern while performing IMAP migration.
Does anyone have any idea what could prevent the syncing?
For this scenario I kindly recommend to Contact Online support which is team of experts in such scenario's where they may need to run diagnostics from backend. Because we do not have enough resources on the forum platform to analyze I can assist on generating and retrieving the relative logs for this issue then you can open service request if may need help interpreting the result: Contact Microsoft Office Support
- Sign in to Microsoft 365 with your Microsoft 365 admin account, and select Support > New service request. If you're in the admin center, select Support > New service request.
In the event that you may need assistance with collecting the this information, our support team will be ready to assist you on call/remote session/via email once you create the New Service request.
For your reference: Troubleshooting IMAP Migrations to Office 365 - Microsoft Community Hub
When troubleshooting failed IMAP migrations, Microsoft support will need at least one of the following XML reports from you:
Get-MigrationBatch -IncludeReport -DiagnosticInfo "showtimeslots, showtimeline, verbose" | Export-Clixml C:\temp\EXO_All_Batches.xml
Get-MigrationBatch <Specific Migration Batch Name> -IncludeReport -DiagnosticInfo "showtimeslots, showtimeline, verbose" | Export-Clixml C:\temp\EXO_Batch_X.xml
Get-MigrationUserStatistics <affected user SMTP> -IncludeSkippedItems -IncludeReport -DiagnosticInfo "showtimeslots, showtimeline, verbose" | Export-Clixml C:\temp\EXO_MigUserStats1.xml
Get-SyncRequest -Mailbox <affected user SMTP> | Get-SyncRequestStatistics -IncludeReport -DiagnosticInfo "showtimeslots, showtimeline, verbose" | Export-Clixml C:\temp\EXO_SyncReq.xml
However, depending on when (in which stage) things have failed, we might not always have a Sync Request for the user or even have a Migration Batch. In that case, you would run commands similar to these:
Get-MigrationEndpoint |FL
Test-MigrationServerAvailability -Endpoint <Identity of the IMAP endpoint from above>
Test-MigrationServerAvailability -Imap -RemoteServer <IMAP server> -Port 993
Test-MigrationServerAvailability -Imap -RemoteServer <IMAP server> -Port 143
Get-MigrationBatch
Get-MigrationUser
Get-SyncRequest -Mailbox <affected user>
If you do have a Sync Request created for the user that failed migration, then you should run Get-SyncRequestStatistics command, as described above, to export the XML report in order to retrieve more information on the cause of the issue. If you don’t have a Sync Request created, but you have a Migration User, you would run Get-MigrationUserStatistics command, as described above. Usually, when customers open support cases with support, for any migration to Office 365, this is because of 2 main reasons:
- Migration failed, and they are unable to migrate one or more users to Office 365. Errors break down in two categories:
- Permanent – the error that actually made the migration fail
- Transient – errors which might slow down the migration to the point where it might fail at the end
- Migration is slow or stalled due to Office 365 Resource Throttling or IMAP Server performance issues. These depend on many factors like source server performance and network related configurations, capabilities or issues. More info here. It can also happen that Office 365 will stall the migrations to protect Office 365 Servers health and also because migrations have a lower priority assigned than things like mail-flow tasks or client connectivity. More info on that can be found here.
Errors are our friends – how to troubleshoot in practice
Based on the failure you got in the Sync Request Statistics or Migration User Statistics, you can find out what is causing the issue and get more details on the migration error. When troubleshooting an IMAP Migration, find out if you have a Sync Request created for the user. If there is one, you would retrieve the Sync Request Statistics for it and store it in a variable or directly export it in an XML report to look at it into detail. To see if the sync request is created for the user, run the following command in Exchange Online PowerShell:
Get-SyncRequest -Mailbox <Affected User SMTP>
Check the STATUS of the Sync Request, is it Failed / Synced / Syncing? Supposing it is Failed, you would then store the Sync Request Statistics into a variable, I used $syncstatsin my example below.
$syncstats = Get-SyncRequestStatistics ******@contoso.com -IncludeReport -DiagnosticInfo "showtimeslots, showtimeline, verbose"
We would then look at the failures. Here are some examples of commands to check various failures:
- Retrieve Last Failure: $syncstats.Report.Failures[-1]
- Retrieve the Last 2 Failures: $syncstats.Report.Failures | select -Last 2
- Retrieve First Failure: $syncstats.Report.Failures[0]
- Count all failures and group them by failure type: $syncstats.Report.Failures | group failuretype | ft -autosize
- List all the failures with their details: $syncstats.Report.Failures
Similarly, if you don’t have a Sync Request but do have a Migration User created and we failed to create a Sync Request, we would need to gather the Migration User Statistics for that user in order to get more details. If you run Get-MigrationUser, you would list all migration users: their Identity, Name of the Migration Batch user is part of, Status and Last Synced time. Example (Get-MigrationUser):
We would then store the Migration User Statistics into a variable or export to XML.
Store into a variable:
$ustats = Get-MigrationUserStatistics ******@contoso.com -IncludeSkippedItems -IncludeReport -DiagnosticInfo "showtimeslots, showtimeline, verbose"
Export to an .xml file:
Get-MigrationUserStatistics ******@contoso.com -IncludeSkippedItems -IncludeReport -DiagnosticInfo "showtimeslots, showtimeline, verbose" | Export-Clixml C:\temp\EXO_MigUserStats1.xml
Thanks for your cooperation.
Sincerely,
Anesu | Microsoft Community Moderator