Microsoft Work Account via IMAP

Harentsoa RANDRIAMAHOLIMANANA 40 Reputation points

Hi everybody.
I have an work account that i want to setup through my webmails using office365 imap and smtp but i'm not able to connect to the account even if the credentials looks all correct .

The error looks like:
IMAP Error: Login failed for against AUTHENTICATE PLAIN: AUTHENTICATE failed


Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
2,711 questions
Microsoft Exchange Online
A family of Microsoft email and calendar products.
2,212 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Domooney-MSFT 1,106 Reputation points Microsoft Employee


    Thank you for posting your query on Microsoft Q&A.

    It is likely that your organization has IMAP blocked, as this is considered a legacy protocol and it is encouraged to keep it disabled.

    Also if your account uses MFA it is not possible to complete this when using IMAP so it will always fail.

    I would suggest to use a webmail solution which supports modern authentication, or else you would need to modify your Exchange Online mailbox to allow IMAP and bypass MFA. We have some details on this here -

    Let me know if you have any further queries, I would be happy to help.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.