Fix Outlook.com to Microsoft 365 IMAP Migration Authentication Failed
Question details
The user is encountering an ImapAuthenticationException error while attempting to migrate emails from Outlook.com to Microsoft 365, despite having IMAP enabled and verifying endpoint connectivity.
- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Migrating email data from an Outlook.com account into a Microsoft 365 environment using an IMAP migration batch.
- Observed behavior
- The IMAP migration fails repeatedly with an ImapAuthenticationException error during the authentication phase.
Ensure you have administrative access to the destination Microsoft 365 admin center and can log into the source Outlook.com account to manage security settings.
Configure Modern Authentication and App Passwords
Use this method to bypass authentication blocks caused by strict security defaults or two-step verification on the source Outlook.com account.
Modern email providers often block basic authentication requests. To allow the migration endpoint to connect successfully, you must ensure modern authentication (OAuth2) is supported or utilize a dedicated App Password if two-step verification is active.
Log in to the Outlook.com account's security dashboard. Navigate to Advanced Security Options and turn on two-step verification if it is not already enabled.
In the same Advanced Security Options menu, scroll down to the App passwords section and click 'Create a new app password'. Note the generated password securely.
Go to the Microsoft 365 Exchange admin center. Edit your IMAP migration endpoint settings and replace the standard Outlook.com account password with the newly generated app password.
Save the endpoint configuration and resume the IMAP migration batch to verify if the authentication succeeds.
Consult Microsoft Exchange Support
If configuration updates and app passwords do not resolve the issue, seek specialized assistance from Microsoft's Exchange community.
Looking for a Lightweight Office Suite? Try WPS Office
While you are managing your email migration in Microsoft 365, you might also need a fast, reliable, and highly compatible office suite for your daily document work. WPS Office is a free, lightweight alternative that handles all major Office formats seamlessly.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install and Launch: Run the setup file and follow the on-screen instructions to install the suite in seconds.
- 3. Open Your Documents: Launch WPS Office and instantly open your existing .docx, .xlsx, or .pptx files without formatting loss.

Frequently Asked Questions
Why do I get an ImapAuthenticationException when IMAP is definitely enabled?
This exception usually occurs because basic authentication is blocked by Microsoft's modern security defaults. Even if IMAP is enabled, the server rejects the connection unless you use Modern Authentication (OAuth2) or an app password.
How do I generate an app password for Outlook.com?
Go to your Microsoft account security settings, select 'Advanced security options', ensure two-step verification is turned on, and then select 'Create a new app password' under the App passwords section.
Can I migrate Outlook.com to Microsoft 365 without enabling two-step verification?
It is increasingly difficult due to mandatory modern security policies. Microsoft highly recommends enabling two-step verification and using an app password for IMAP connections to ensure a secure and successful migration.




