User is authenticated but not connected

Andrii Maslov 46 Reputation points
2021-02-19T09:25:15.717+00:00

Greetings!

I have a web app that uses oauth authentication with IMAP/SMTP protocols to access emails in office365/outlook mailboxes. But a few customers had a problem connecting through those protocols Server returns A0003 BAD User is authenticated but not connected after selecting mailbox. I've tested oauth flow with my personal outlook and office365 accounts - and I haven't experienced such error.

Customers that have this problem has a normal mailbox, not shared one. Also SMPT/IMAP options are turned on. The problem began a couple days ago, no changes in oauth flow in my web application were done.

I've did some research on my own but didn't find much. So my questions are :

  • what could cause this error and what actions needed to be applied to solve it?
  • is it from my end(oauth flow) or customer(o365/azure portals settings)?
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Marilee Turscak-MSFT 37,206 Reputation points Microsoft Employee Moderator
    2021-02-20T00:54:20.487+00:00

    Hi @Andrii Maslov ,

    I have not encountered this issue myself, but have seen some similar cases where this can happen if someone enters a bad password or credentials, or unsuccessful MFA. It will look like there was a successful authentication when there wasn't one.

    I found an issue where someone else received this error, and it looks like it can happen due to an incorrect CLI command.

    The solution listed in the thread:

    proper CLI arguments for imapsync are: --authuser2 "******@domain.tld" --user2 "******@domain.tld" --office2

    Before that, the following PowerShell command must be executed: Add-MailboxPermission -identity ******@domain.tld -user ******@domain.tld -accessrights fullaccess -inheritancetype all


  2. sonb 0 Reputation points
    2023-04-03T02:15:03.0166667+00:00

    Check out this once for fixing error Bad User Is Authenticated But Not Connected if you found useful

    0 comments No comments

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.