How to Fix IMAP LOGIN Failed with a Microsoft Account App Password
Question details
The user is unable to log in via IMAP using a Microsoft Account app password, despite having IMAP, MFA, and the app password feature enabled.

- Product
- Microsoft Exchange
- Device & OS
- not provided
- Scenario
- Attempting to connect a third-party email application to a Microsoft email account using IMAP and a generated app password.
- Observed behavior
- The IMAP LOGIN process fails with an authentication error, preventing the email application from connecting to the mailbox.
Ensure you have administrative access to the Microsoft 365 Admin Center (if using a business account) and generate a fresh app password from your Microsoft account security settings.
Verify Tenant and Mailbox Authentication Settings
Check your Microsoft 365 administrative settings to ensure that IMAP basic authentication and app passwords are not blocked by organizational policies.
Even when an app password is created, tenant-level security defaults or Conditional Access policies can block legacy authentication methods like IMAP. You must verify both tenant-wide and mailbox-specific settings.
Sign in to the Microsoft 365 Admin Center, navigate to 'Active users', select the affected account, click the 'Mail' tab, and select 'Manage email apps' to confirm IMAP is checked.
Go to 'Settings' > 'Org settings' > 'Modern authentication' in the Admin Center. Ensure that Basic authentication for IMAP is allowed if your application requires it.
If your tenant uses 'Security defaults', basic authentication (which app passwords rely on) is automatically blocked. Consider transitioning to Conditional Access policies if you need to allow exceptions for specific accounts.

Configure Correct IMAP Server Settings
Ensure your third-party email application is routing the login request to the correct Microsoft server with the proper encryption protocol.
Enhance Your Productivity with WPS Office
While troubleshooting complex Microsoft Exchange settings and IMAP authentication failures can be frustrating, handling your daily documents shouldn't be. Choose WPS Office as your free, lightweight alternative for seamless document creation. It offers high compatibility with Microsoft formats, a familiar interface, and requires no complicated account setups to get started.
- 1. Download the installer: Visit the official WPS Office website and click the free download button.
- 2. Install the suite: Run the downloaded setup file and follow the simple on-screen instructions to install WPS Office on your computer.
- 3. Open your documents: Launch WPS Office to easily open, edit, and save your existing Microsoft Office files without any format loss.

Frequently Asked Questions
Why does my Microsoft app password not work for IMAP connections?
Microsoft has been deprecating Basic Authentication across all tenants. If your organization has 'Security Defaults' enabled or has explicitly disabled Basic Authentication for IMAP, app passwords will fail to authenticate regardless of your mailbox settings.
What are the correct IMAP server settings for a Microsoft account?
For a Microsoft Exchange or Outlook account, the incoming IMAP server should be set to outlook.office365.com. The required port is 993, and the connection must use SSL/TLS encryption.
How do I generate a new app password for my Microsoft account?
Log in to your Microsoft account's Security dashboard, navigate to Advanced security options, ensure Two-step verification is turned on, and scroll down to the App passwords section to click 'Create a new app password'.
Does my email application support Modern Authentication?
Most up-to-date mail clients like Outlook, Apple Mail, and Thunderbird support Modern Authentication (OAuth2). If your application prompts you with a web-based Microsoft login screen rather than just a basic password field, it supports Modern Authentication, and you do not need an app password.




