SAP Knowledge Base Article - Preview

3267439 - Mail Adapter with Oauth 2.0 to Microsoft Office 365 fails during authentication

Symptom

You are using Mail adapter and configuring Oauth 2.0 with Microsoft Office 365. Access Token is generated but you get the following authentication error:

Exception caught during processing mail message; javax.mail.MessagingException: EK3 BAD User is authenticated but not connected.;
nested exception is:
com.sun.mail.iap.BadCommandException: EK3 BAD User is authenticated but not connected.

XPI Inspector contains the following stack trace:

[EXCEPTION]
javax.mail.MessagingException: <return code> BAD User is authenticated but not connected.;
  nested exception is:
com.sun.mail.iap.BadCommandException: <return code>BAD User is authenticated but not connected.
at com.sun.mail.imap.IMAPFolder.logoutAndThrow(IMAPFolder.java:1156)
at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:1063)
at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:977)
at com.sap.aii.af.sdk.xi.net.IMAPClientConnection.getSize(IMAPClientConnection.java:918)
at com.sap.aii.af.sdk.xi.srt.xmb.XMBIMAPInitiatorServiceImpl$MailClientTask.invoke(XMBIMAPInitiatorServiceImpl.java:552)
at com.sap.aii.af.lib.scheduler.JobBroker$Worker.run(JobBroker.java:529)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302)
Caused by: com.sun.mail.iap.BadCommandException: EK3 BAD User is authenticated but not connected.
at com.sun.mail.iap.Protocol.handleResult(Protocol.java:414)
at com.sun.mail.imap.protocol.IMAPProtocol.examine(IMAPProtocol.java:1284)
at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:1032)
... 8 more


Read more...

Environment

Process Orchestration 7.5

Keywords

SAP PO Mail adapter, SAP PI Mail adapter, Oauth 2.0, Oauth, Oauth2.0, Office265, Microsoft Office 365, Microsoft Azure, Microsoft , KBA , BC-XI-CON-MAI , Mail Adapter , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.