Incoming mail not working with error "Logon failure: unknown user name or bad password" when using Exchange

Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When using Exchange as a Service Provider all Incoming mail handlers (Jira and Jira Service Management) stop working.

Environment

Jira 8.15.1 or higher, integrated with a Microsoft Office 365 or Microsoft Exchange mailbox.

Diagnosis

Basic authentication is being used on Incoming mail handler or JSM Email channel.

On the logs we can see the following error:

1 2022-10-04 14:58:22,163-0700 WARN [Handler Test] Caesium-1-4 anonymous Handler Test[11311]: javax.mail.AuthenticationFailedException: Logon failure: unknown user name or bad password. while connecting to host "outlook.office365.com" as user "jira.admin@test.com" via protocol "SECURE_POP"

Cause

Microsoft turned off basic auth after October 1st, all customers will be able to use the self-service diagnostic to re-enable basic auth for any protocols they need, once per protocol. Details on this process on bellow link.

Basic Authentication Deprecation in Exchange Online – September 2022 Update

Once this diagnostic is run, basic auth will be re-enabled for those protocol(s). Selected protocol(s) will stay enabled for basic auth use until the end of December 2022. During the first week of the calendar year 2023, those protocols will be disabled for basic auth use permanently, and there will be no possibility of using basic auth after that.

Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.