MS365 IMAP+OAUTH2 Fails in Mail Clients

Thomas Ward 10 Reputation points
2023-12-12T22:27:36.47+00:00

For some time now, I've been trying to enable IMAP access to my user on a tenant in order to debug if an issue is specific to Microsoft Outlook clients or other ones.

In this tenant, my user is enabled for Authenticated SMTP and IMAP for access to mail. Unfortunately, while this works fine for one tenant of mine, it fails for another with the corresponding error messages of "S: 3 BAD User is authenticated but not connected." from the server.

This is confirmed with the Microsoft Remote Connectivity Analyzer at https://testconnectivity.microsoft.com/tests/O365Imap/input which gives the same error codes.

My user is enabled for Authenticated SMTP and IMAP in the MS365 admin panel, but still gets this error, suggesting something is fubar with the MS365 side of things.

CAPs are bypassed in this case because I've got a network range as a Trusted Network for this.

Any ideas for testing/fixing?

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,180 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Kael Yao 37,746 Reputation points Moderator
    2023-12-13T02:11:39.1566667+00:00

    Hi @Thomas Ward,

    If this issue is also occurring to Outlook clients configured with IMAP, please consider creating a service request in Microsoft 365 admin center to contact support to check in backend.

    Thanks for your understanding.


    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.


Your answer

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