Share via

Cannot migrate email from IMAP source

Umar Afzal 0 Reputation points
2025-09-21T18:33:05.1266667+00:00

I have the following error when attempting to migrate a mailbox from IMAP source. Both username and password are correct but authentication still fails. Endpoint is configured correctly. Can you provide any guidance?

Error: ImapAuthenticationException: The username or password for this account is incorrect, or IMAP access is disabled. --> Imap server reported an error during LOGIN indicating that authentication failed: 'Authentication failed

Exchange Online
Exchange Online

A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Kha-N 8,260 Reputation points Microsoft External Staff Moderator
    2025-09-22T01:27:23.7933333+00:00

    Hi @Umar Afzal,

    Welcome to the Q&A forum, and thank you very much for reaching out.

    I understand you're trying to migrate a mailbox from an IMAP source and encountered this error:

    ImapAuthenticationException: The username or password is incorrect, or IMAP access is disabled. IMAP server reported: 'Authentication failed'

    Just to confirm, did you follow this document to migrate the mailbox from IMAP source?

    Based on my research, even though the username, password, and endpoint are correct. This issue can still occur.

    please note that as a Microsoft Q&A moderator, I don’t have access to your specific environment. But rest assured, I’m here to support you with helpful resources and information that may resolve the issue.

    As I checked, here are a few suggestions that may work on your environment:

    • Use Full Email Address as Username: Make sure the username of the migrate mailbox is the full email address (e.g., user@example.com). Some IMAP servers need the complete address to authenticate.
    • Double-check IMAP Access: Even with a configured endpoint, IMAP might still be disabled at the mailbox level. Some providers require enabling it manually for each account, especially in security focused environments. It’s worth confirming this setting to rule it out.
    • Use an App Password (if 2FA is enabled): If the account uses two-factor authentication, regular passwords may not work. You’ll need to create and use an app password for IMAP access.
    • Test Server Connectivity: you can use Microsoft Test connectivity to run an IMAP test. This confirms if the server is reachable and accepting logins.
    • Run PowerShell Test: you can try this command in PowerShell to check if the server is accessible for migration.
    Test-MigrationServerAvailability -Imap -RemoteServer <IMAP server> -Port 993
    

    The server is accessible for migration If the result is “Success”.

    User's image

    • Review Server-Level Settings (if applicable): Even with a working endpoint, issues like certificate mismatches or DNS misrouting can still block authentication. If you've already checked this, it may help to revalidate with your hosting provider or IT team.

    Additionally, Microsoft has an Article that covers how to troubleshoot issues with IMAP mailbox migration. I highly recommend you check it out, as it may offer solutions that apply to your situation.

    If you have any other questions or need clarification, just let me know on the comment section below. I would love to assist you further.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".     

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.