BizTalk 2020 - Office 365 Outlook Adapter - TMS errors

%3CLINGO-SUB%20id%3D%22lingo-sub-1936104%22%20slang%3D%22en-US%22%3EBizTalk%202020%20-%20Office%20365%20Outlook%20Adapter%20-%20TMS%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1936104%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20guys%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20to%20use%20the%26nbsp%3BOffice365%20Outlook%20Email%20adapter%2C%20but%20TMS%20is%20acting%20up.%3C%2FP%3E%3CP%3EMy%20setup%20is%20a%20single%20BizTalk%202020%20server%20and%20a%202-node%20active%20passive%20SQL%20cluster.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20works%20fine%20on%20my%20BTS2016%20box%2C%20but%20when%20I%20try%20to%20make%20it%20work%20on%20my%202020%2C%20I%20see%20errors%20in%20the%20event%20log%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20enable%20the%20RL%20utilizing%20the%20adapter%2C%20I%20get%20met%20with%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EThe%20adapter%20%22Office365%20Outlook%20Email%22%20raised%20an%20error%20message.%20Details%20%22Http%20request%20to%20%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fme%2FmailFolders%2FAQMkAGJlNDc5ZjFkLTc5ZmItNDcxZC1hOGUyLWVkMzllNjllODMyMQAuAAADC-uxAOkD3EGNcw-wSl62GwEAw6-T4kh40ESBRITZneUsPgAAAgEMAAAA%2Fmessages%3F%24filter%3D%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fme%2FmailFolders%2FAQMkAGJlNDc5ZjFkLTc5ZmItNDcxZC1hOGUyLWVkMzllNjllODMyMQAuAAADC-uxAOkD3EGNcw-wSl62GwEAw6-T4kh40ESBRITZneUsPgAAAgEMAAAA%2Fmessages%3F%24filter%3D%3C%2FA%3E%20isRead%20eq%20false%20and%20%3CSTRONG%3EReceivedDateTime%20gt%202020-11-02T15%3A42%3A02Z%3C%2FSTRONG%3E%26amp%3B%24orderby%3DreceivedDateTime%20ASC%26amp%3B%24top%3D10%20failed%20with%20status%20code%20Unauthorized.%20Details%3A%20%7B%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%22error%22%3A%20%7B%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%22code%22%3A%20%22InvalidAuthenticationToken%22%2C%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%22message%22%3A%20%22Access%20token%20has%20expired.%22%2C%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%22innerError%22%3A%20%7B%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%22date%22%3A%20%222020-11-27T14%3A01%3A58%22%2C%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%22request-id%22%3A%20%22a45edaed-b296-4797-bfdf-bcb64cffe258%22%2C%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%22client-request-id%22%3A%20%22a45edaed-b296-4797-bfdf-bcb64cffe258%22%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20when%20the%20RL%20shuts%20down%2C%20I%20get%20this%20every%205%20minutes%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EInternal%20error%3A%20Failed%20to%20refresh%20tokens.%20Details%3A%20System.Collections.Generic.KeyNotFoundException%3A%20The%20given%20key%20was%20not%20present%20in%20the%20dictionary.%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3Eat%20System.Collections.Generic.Dictionary%602.get_Item(TKey%20key)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3Eat%20Microsoft.BizTalk.TokenStore.BizTalkTokenStore.%3CREFRESHTOKENSASYNC%3Ed__4.MoveNext()%3C%2FREFRESHTOKENSASYNC%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3Eat%20System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task%20task)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3Eat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3Eat%20Microsoft.BizTalk.TokenStore.Service.TokenRefreshService.%3CREFRESHTOKENSASYNC%3Ed__13.MoveNext()%3C%2FREFRESHTOKENSASYNC%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3Eat%20System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task%20task)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3Eat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3Eat%20Microsoft.BizTalk.TokenStore.Service.TokenRefreshService.%3CREFRESHTIMER_TICK%3Ed__11.MoveNext()%3C%2FREFRESHTIMER_TICK%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20made%20sure%20that%20the%20server%20has%20CU1%20installed%2C%20the%20BizTalk%20service%20user%20is%20SSO%20administrator%2C%20local%20administrator%2C%20BizTalk%20Server%20Adminstrator%2C%20the%20ENTSSO%20service%20is%20running%2C%20disabled%20the%20Windows%20firewall%20between%20them%20etc.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20at%20a%20standstill%20right%20now.%20Any%20suggestions%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1936104%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBizTalk2020%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Outlook%20adapter%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETMS%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Hi guys,

 

I am trying to to use the Office365 Outlook Email adapter, but TMS is acting up.

My setup is a single BizTalk 2020 server and a 2-node active passive SQL cluster.

 

It works fine on my BTS2016 box, but when I try to make it work on my 2020, I see errors in the event log

 

When I enable the RL utilizing the adapter, I get met with this:

 

The adapter "Office365 Outlook Email" raised an error message. Details "Http request to https://graph.microsoft.com/v1.0/me/mailFolders/AQMkAGJlNDc5ZjFkLTc5ZmItNDcxZC1hOGUyLWVkMzllNjllODMy... isRead eq false and ReceivedDateTime gt 2020-11-02T15:42:02Z&$orderby=receivedDateTime ASC&$top=10 failed with status code Unauthorized. Details: {
"error": {
"code": "InvalidAuthenticationToken",
"message": "Access token has expired.",
"innerError": {
"date": "2020-11-27T14:01:58",
"request-id": "a45edaed-b296-4797-bfdf-bcb64cffe258",
"client-request-id": "a45edaed-b296-4797-bfdf-bcb64cffe258"

 

And when the RL shuts down, I get this every 5 minutes:

 

Internal error: Failed to refresh tokens. Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.BizTalk.TokenStore.BizTalkTokenStore.<RefreshTokensAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.BizTalk.TokenStore.Service.TokenRefreshService.<RefreshTokensAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.BizTalk.TokenStore.Service.TokenRefreshService.<RefreshTimer_Tick>d__11.MoveNext()

 

I have made sure that the server has CU1 installed, the BizTalk service user is SSO administrator, local administrator, BizTalk Server Adminstrator, the ENTSSO service is running, disabled the Windows firewall between them etc. 

 

I am at a standstill right now. Any suggestions?

1 Reply

I would check to test the logon outside and also to recreate the logon to make sure it is correct and check if it is working fine with BizTalk 2020 CU2 and the tips from here to put dependency if there is no dependency already:
https://techcommunity.microsoft.com/t5/biztalk-server/biztalk-tms-does-not-start-after-biztalk-serve...