Unable to authenticate Office365 secure IMAP/POP

Anupam Panta October 11, 2022

I am using an outdated version of Jira, Jira v8.0.2, JIRA Service Desk Application v4.0.2.
I am unable to authenticate Office365 email from earlier this morning. We are using Secure IMAP for authentication. 

While trying with Secure IMAP, I am getting AUTHENTICATION FAILURE with the following error:

javax.mail.AuthenticationFailedException: AUTHENTICATE failed.
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:727) [javax.mail-1.6.0.jar:1.6.0]
at javax.mail.Service.connect(Service.java:366) [javax.mail-1.6.0.jar:1.6.0]
at javax.mail.Service.connect(Service.java:246) [javax.mail-1.6.0.jar:1.6.0]
at javax.mail.Service.connect(Service.java:267) [javax.mail-1.6.0.jar:1.6.0]
at com.atlassian.jira.internal.mail.processor.feature.channel.connectionverifier.DefaultChannelConnectionVerifier.verifyConnectionDefinition(DefaultChannelConnectionVerifier.java:60) [?:?]
at sun.reflect.GeneratedMethodAccessor2664.invoke(Unknown Source) [?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_181]
at java.lang.reflect.Method.invoke(Method.java:498) [?:1.8.0_181]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) [spring-aop-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [?:?]
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) [?:?]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) [spring-aop-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) [spring-aop-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) [spring-aop-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) [spring-aop-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) [?:?]
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) [?:?]

 

I also tried with Secure POP, and weirdly got `unknown username or bad password` with the following error:

2022-10-11 15:06:33,772 ERROR [] http-nio-8080-exec-17 USERNAME 906x28893x1 1i25djp 110.44.125.18,127.0.0.1 /rest/servicedesk/1/servicedesk/IS/incomingemail/validateemailforcreation Unable to connect to the server at outlook.office365.com due to the following exception:
javax.mail.AuthenticationFailedException: Logon failure: unknown user name or bad password.
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:214) [javax.mail-1.6.0.jar:1.6.0]
at javax.mail.Service.connect(Service.java:366) [javax.mail-1.6.0.jar:1.6.0]
at javax.mail.Service.connect(Service.java:246) [javax.mail-1.6.0.jar:1.6.0]
at javax.mail.Service.connect(Service.java:267) [javax.mail-1.6.0.jar:1.6.0]
at com.atlassian.jira.internal.mail.processor.feature.channel.connectionverifier.DefaultChannelConnectionVerifier.verifyConnectionDefinition(DefaultChannelConnectionVerifier.java:60) [?:?]
at sun.reflect.GeneratedMethodAccessor2664.invoke(Unknown Source) [?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_181]
at java.lang.reflect.Method.invoke(Method.java:498) [?:1.8.0_181]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) [spring-aop-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [?:?]
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) [?:?]

 

I understand Microsoft disabled IMAP with Modern Auth from October 1, 2022, IMAP was working till today, Oct 11, but as I mentioned we are using an outdated version, and it doesnot support Modern Auth. Secure IMAP was working 

1 answer

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2023

@Anupam Panta Welcome to the Atlassian community

This is due to Microsoft's deprecation of service as you pointed out and is discussed in the KB here: https://confluence.atlassian.com/jirakb/integrating-oauth-2-0-for-microsoft-accounts-on-jira-1188414154.html 

You are also correct that this is not supported in your version.  Without upgrading you will not be able to use the delivered services.

Katelyn Macri April 20, 2023

Same issue here. We were moving to cloud but due to HIPAA issues we had to put it hold. Meanwhile, we are currently on Jira v8.16.1.  If we update to a newer version, will the issue be resolved so we can use Oauth 2.0? I'd really like to use email channels. Any idea what version we would need? 

thanks -

Suggest an answer

Log in or Sign up to answer