How to Use Azure AD Connect Before IMAP Mailbox Migration
Question details
The user wants to know how to properly synchronize on-premises Active Directory identities with Microsoft Entra ID prior to executing an IMAP mailbox migration from cPanel to Exchange Online.

- Product
- Exchange Online
- Device & OS
- not provided
- Scenario
- Organizations need to migrate user mailboxes from cPanel to Exchange Online while maintaining synchronized on-premises identities.
- Observed behavior
- Synchronize identities using Azure AD Connect, provision target mailboxes, and correctly map credentials to move emails via IMAP migration.
Ensure you have administrator access to both your on-premises Active Directory and Microsoft 365 tenant, and verify that your routing domains are fully validated in Microsoft Entra ID.
Synchronize Identities and Execute IMAP Migration
Use Azure AD Connect to synchronize user accounts to Microsoft Entra ID, assign licenses, and run the IMAP migration batch from the Exchange Admin Center.
By synchronizing identities first, you establish the required target environment in Exchange Online. Once mailboxes are provisioned and licensed, IMAP migration can securely transfer email data from the legacy cPanel server.
Install and run Azure AD Connect on your server to synchronize your on-premises Active Directory users with Microsoft Entra ID.
Log in to the Microsoft 365 Admin Center, locate the newly synchronized users, and assign the appropriate licenses to provision their Exchange Online mailboxes.
Create a CSV file containing the IMAP migration mapping. You will need columns for the target EmailAddress, UserName, and Password associated with the source cPanel mailboxes.
In the Exchange Admin Center, navigate to Migration, create a new migration endpoint, and input the IMAP server settings (e.g., imap.yourdomain.com) of your cPanel environment.
Create a new migration batch under the Migration tab, upload your prepared CSV file, select your IMAP endpoint, and start the synchronization process.
Manage Migration CSV Files with WPS Office
During an IMAP migration, administrators must carefully create and manage CSV mapping files containing user credentials and target addresses. WPS Office Spreadsheet provides a lightweight, fast, and highly compatible tool to organize your migration data, serving as an excellent free alternative to Microsoft Office.
- 1. Download and Install WPS Office: Get the free WPS Office suite from the official website and install it on your workstation.
- 2. Create the Migration Mapping: Open WPS Spreadsheet and input your cPanel to Exchange Online email mapping data (EmailAddress, UserName, Password).
- 3. Save as CSV Format: Go to Menu > Save As, and choose the CSV (Comma delimited) format to ensure compatibility with the Exchange Admin Center.

Frequently Asked Questions
Can I migrate email first and sync Active Directory identities later?
It is highly recommended to sync identities with Azure AD Connect and provision the mailboxes first. The IMAP migration requires active, licensed target mailboxes in Exchange Online to receive the incoming emails.
What information is required for the IMAP migration CSV file?
The CSV file must contain the source username, the source password (or an app-specific password if MFA is enabled on the source), and the target Exchange Online email address for each user.
Does an IMAP migration transfer contacts and calendars from cPanel?
No, IMAP migrations only transfer email messages and folder structures. Contacts, calendars, and tasks must be exported locally to PST or CSV files and imported into the new Exchange Online mailboxes manually.
How long does the IMAP migration synchronization take?
The duration depends entirely on the volume of email data, network bandwidth, and the performance of your cPanel source server. You can monitor the real-time progress of the synchronization directly within the Exchange Admin Center.




