Error configuring OAuth from Exchange 2016 (AADSTS700027)

Mikkel Andreasen | Modulo ApS 6 Reputation points
2021-03-17T17:31:28.72+00:00

Hi,
I'm in the process of configuring OAuth from en on-premises Exchange 2016 CU19+ install to in order to have calendar integration within Microsoft Teams.
The HCW wizard has completed successfully, but no calender tab is visible within the Teams client (thick or web - same issue).

I've tested with

Test-OAuthConnectivity -Service EWS -TargetUri https://outlook.office365.com/ews/exchange.asmx -Mailbox mailbox@localdomain.tld 

And the error is

AADSTS700027: Client assertion contains an invalid signature. [Reason - The key was not found., Thumbprint of key used by client: xxxxxxxxx

I've tried verifying the certificate used for OAuth and it looks OK.

Running this command I've saved the certificate and compared it to the thumbprint from get-authConfig - they match and have not expired

Get-MsolServicePrincipalCredential -ServicePrincipalName "00000002-0000-0ff1-ce00-000000000000" -ReturnKeyValues $true

I'm kind of stumped as to how to solve this issue.

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,390 questions
0 comments No comments
{count} vote

6 answers

Sort by: Most helpful
  1. Mikkel Andreasen | Modulo ApS 6 Reputation points
    2021-03-18T13:49:39.137+00:00

    Thank you all for your suggestions - I've gotten a bit further

    • OAuth is now working. Found a error in the WindowsAzureACS AuthServer configuration.
    • The Invoke-RestMethod -Uri "https://autodiscover.domain.tld/autodiscover/autodiscover.json?Email=mymailbox@keyman .tld&Protocol=EWS&RedirectCount=5" -UserAgent Teams is working as well. Turned out to a client side issue. With only TLS1.2 enabled on the Exchange server I needed to force my powershell client to use TLS1.2 as well

    Unfortunately the issue with the Teams client persists, and I've opened a case with Microsoft - I'll make sure to update this thread once it has been resolved. It may help others facing the same issue.

    /mikkel