IMAP returning "BAD User is authenticated but not connected."

edss testt 5 Reputation points
2023-02-22T12:18:05.1+00:00

Hi,

I have a user application that connects to mailboxes via OAuth, around 05:15 UTC Feb 22, all of my users started experiencing errors.

The credentials are able to log in just fine using the "AUTHENTICATE XOAUTH2" method but the subsequent mailbox commands LIST "" "*" or SELECT Inbox fail right away with the response "BAD User is authenticated but not connected."

Our IMAP implementation hasn't changed in years and all of a sudden it affecting them all. Is there something that has changed recently? Right now my users are completely broken.
Some other posts seem to reference IPv6 but I have confirmed I am trying to access from IPv4.

Outlook
Outlook
A family of Microsoft email and calendar products.
3,142 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
4,958 questions
Microsoft Q&A
Microsoft Q&A
Use this tag to share suggestions, feature requests, and bugs with the Microsoft Q&A team. The Microsoft Q&A team will evaluate your feedback on a regular basis and provide updates along the way.
606 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Patchfox 3,791 Reputation points
    2023-02-23T19:36:29.35+00:00

    As already written, I recommend not using the Outlook Mail REST API (DEPRECATED) anymore or migrating to it.

    The clear recommendation is to use the Graph API and the Outlook Mail REST interface.

    If the reply was helpful, please don’t forget to upvote or accept it as an answer, thank you.

    0 comments No comments

  2. Faery Fu-MSFT 17,391 Reputation points Microsoft Vendor
    2023-02-28T04:56:50.4066667+00:00

    Hi @edss testt ,

    Thanks for your feedback above which shared more information and glad to know that your issue is resolved now! Since our forum has the policy that the question author cannot accept their own answer. They can only accept answers by others, and according to the scenario introduced here: Answering your own questions on Microsoft Q&A

    I would make a brief summary of this post so that other forum members could easily find useful information here:

    Issue Symptom:

    IMAP returning "BAD User is authenticated but not connected."

    Solution:

    MS disabled access using the old scopes and re-enabled them.

    Going forward does anyone know the "correct" scopes we should be requesting from our users to allow IMAP access?

    You can refer to this article to learn about scopes and permissions in the identity platform:

    Scopes and permissions in the Microsoft identity platform

    In addition, we recommend that you post in the Microsoft Graph Mail API for more appropriate assistance.

    You could "Accept Answer" for this summary to close this thread, and your action would be helpful to other users who encounter the same issue and read this thread. Thanks for your understanding!

    0 comments No comments