BizTalk 2020 - Office 365 Outlook Adapter - TMS errors

Copper Contributor

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...