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CZWdBVzdfVTJXVk9QNHZMcVNBQSIsInZlciI6IjEuMCIsIndpZHMiOlsiMDk5N2ExZDAtMGQxZC00YWNiLWI0MDgtZDVjYTczMTIxZTkwIl19.YY8-3LStoAOAfLffwU_FphQ8sn26zuRBYEKFZtfYMz8SzemRgDAVpF4cGNlaDM5LablNqpa3Ug1NZ0Ot1ZdurwJdJbqeBlz0AbmZJ8XBV8KJ3q7Zm912xTy-bfEjMu-lTUSRZW5_sKIXXgEmoePjDwEbvlDLSsOoz2rGf00irI7uJMotCb7d-Ob4CCGb6m32ls5TaPTT1LfbV9oUcJ1EWOG8rDf7gml-A3y9lcbJBceHn2sR2Y2mW-JV6nII0O_Mts443lPHxiwG_fwuPkgrnntb-3ZfCfgbdLQ931lvtaZKI_7Nic5xn6o-ndlbEHpezqzF_WFSF67pRrq7iN2XKg
DEBUG: JavaMail version 1.6.2
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: setDebug: JavaMail version 1.6.2
DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle]
DEBUG IMAPS: mail.imap.fetchsize: 16384
DEBUG IMAPS: mail.imap.ignorebodystructuresize: false
DEBUG IMAPS: mail.imap.statuscachetimeout: 1000
DEBUG IMAPS: mail.imap.appendbuffersize: -1
DEBUG IMAPS: mail.imap.minidletime: 10
DEBUG IMAPS: enable STARTTLS
DEBUG IMAPS: enable SASL
DEBUG IMAPS: SASL mechanisms allowed: XOAUTH2
DEBUG IMAPS: closeFoldersOnStoreFailure
OAUTH2 IMAP trying to connect with system properties to Host:outlook.office365.com, Port: 993, userEmailId: Imixs_bhv@alexander-logistics.com, AccessToken: eyJ0eXAiOiJKV1QiLCJub25jZSI6ImVlQzNBUmx2SENia2NCczA2QmRacm9zNWlkWXlvc3ljNDdiUjZNMGRZeXMiLCJhbGciOiJSUzI1NiIsIng1dCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyIsImtpZCI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NlaDM5LablNqpa3Ug1NZ0Ot1ZdurwJdJbqeBlz0AbmZJ8XBV8KJ3q7Zm912xTy-bfEjMu-lTUSRZW5_sKIXXgEmoePjDwEbvlDLSsOoz2rGf00irI7uJMotCb7d-Ob4CCGb6m32ls5TaPTT1LfbV9oUcJ1EWOG8rDf7gml-A3y9lcbJBceHn2sR2Y2mW-JV6nII0O_Mts443lPHxiwG_fwuPkgrnntb-3ZfCfgbdLQ931lvtaZKI_7Nic5xn6o-ndlbEHpezqzF_WFSF67pRrq7iN2XKg
DEBUG IMAPS: trying to connect to host "outlook.office365.com", port 993, isSSL true
* OK The Microsoft Exchange IMAP4 service is ready. [RgBSADIAUAAyADgAMQBDAEEAMAAxADcAMwAuAEQARQBVAFAAMgA4ADEALgBQAFIATwBEAC4ATwBVAFQATABPAE8ASwAuAEMATwBNAA==]
A0 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
A0 OK CAPABILITY completed.
DEBUG IMAPS: AUTH: PLAIN
DEBUG IMAPS: AUTH: XOAUTH2
DEBUG IMAPS: protocolConnect login, host=outlook.office365.com, user=Imixs_bhv@alexander-logistics.com, password=<non-null>
DEBUG IMAPS: SASL Mechanisms:
DEBUG IMAPS:  XOAUTH2
DEBUG IMAPS:
DEBUG IMAPS: SASL client XOAUTH2
DEBUG IMAPS: SASL callback length: 2
DEBUG IMAPS: SASL callback 0: javax.security.auth.callback.NameCallback@5f683daf
DEBUG IMAPS: SASL callback 1: javax.security.auth.callback.PasswordCallback@78ffe6dc
A1 AUTHENTICATE XOAUTH2 dXNlcj1JbWl4c19iaHZAYWxleGFuZGVyLWxvZ2lzdGljcy5jb20BYXV0aD1CZWFyZXIgZXlKMGVYQWlPaUpLVjFRaUxDSnViMjVqWlNJNkltVmxRek5CVW14MlNFTmlhMk5DY3pBMlFtUmFjbTl6Tldsa1dYbHZjM2xqT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
DEBUG IMAPS: AUTH: PLAIN
DEBUG IMAPS: AUTH: XOAUTH2
DEBUG IMAPS: IMAPProtocol noop
A3 NOOP
A3 OK NOOP completed.
Connection Established using imap protocol successfully !
DEBUG IMAPS: IMAPProtocol noop
A4 NOOP
A4 OK NOOP completed.
DEBUG IMAPS: connection available -- size: 1
A5 SELECT INBOX
A5 BAD User is authenticated but not connected.
A6 LOGOUT
* BYE Microsoft Exchange Server IMAP4 server signing off.
A6 OK LOGOUT completed.
javax.mail.MessagingException: A5 BAD User is authenticated but not connected.;
  nested exception is:
	com.sun.mail.iap.BadCommandException: A5 BAD User is authenticated but not connected.
	at com.sun.mail.imap.IMAPFolder.logoutAndThrow(IMAPFolder.java:1180)
	at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:1087)
	at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:1001)
	at com.alexanderlogistics.TestIMAPOutlookOAuth.TestMailboxImixsBHV(TestIMAPOutlookOAuth.java:91)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: com.sun.mail.iap.BadCommandException: A5 BAD User is authenticated but not connected.
	at com.sun.mail.iap.Protocol.handleResult(Protocol.java:439)
	at com.sun.mail.imap.protocol.IMAPProtocol.select(IMAPProtocol.java:1252)
	at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:1058)
	... 24 more
