# How to fix "BAD User is authenticated but not connected" error​

First of all, check the official Jira Knowledge Base documentation for this issue and follow instructions there:\
<https://confluence.atlassian.com/jirakb/imap-fails-with-a3-bad-user-is-authenticated-but-not-connected-error-in-jira-server-integrated-with-office365-665420269.html>​\
\
If that does not help, start the authorization again, and it should require the account to log in.\
After the successful authorization, we try to update the Username field by retrieving it from Microsoft. \
Make sure that the Username is updated after the successful Authorization according to the account used for the consent.

If the Username update is successful, it means that the configuration on the Microsoft side is incorrect in one of the following ways:

* It is a shared mailbox and an incorrect login scheme is being used. For more details, visit the below link: \
  <https://docs.microsoft.com/en-us/answers/questions/162233/shared-mailbox-oauth-access.html>​
* The account that you use is not licensed (or it is an F3 license that only allows for POP3 connections), in which case, you need to apply or re-apply the license (on the Office 365 side).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meta-inf.hu/email-this-issue/administration/mail-server-connections/microsoft-with-oauth2/troubleshooting-guides-for-microsoft-oauth2-connections/how-to-fix-bad-user-is-authenticated-but-not-connected-error.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
