IMAP/OAUTH BAD USER IS AUTHENTICATED BUT NOT CONNECTED

Daniel Boylan 1 Reputation point
2022-12-01T15:14:49.613+00:00

Hi!

I am trying to set up email access in my application using IMAP. I am using Oauth authentication and client credentials flow. I am able to log into a mail under my organization with IMAP enabled.
But when i try to log in using an email under a different organization i am able to connect using IMAP but i am not able to select a inbox. I have added this email as a guest in the application.
266233-image.png. What is wrong here? Any help is needed as i've been stuck on this for a while.

Error message:
: 'IMAP protocol error. 2 BAD User is authenticated but not connected..'

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,173 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,345 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Aholic Liang-MSFT 13,741 Reputation points Microsoft Vendor
    2022-12-02T05:42:10.383+00:00

    Hi @Daniel Boylan

    In another different organization, did you enable IMAP for the users?
    In addition, please refer to the following link to check whether security defaults are enabled in this organization.
    Providing a default level of security in Azure Active Directory - Microsoft Entra | Microsoft Learn

    If it is enabled, please disable it and try again to see if it works.


    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.

    0 comments No comments