I have an SPA application derived from the Identity Platform sample that originally calls a Graph API.
I've changed the endpoint to call a local API.
The SPA uses Azure AD for authentication.
The API sample is derived from the VS 2019 project template for API.
,NET 4.7.2 - no .NET Core.
I can authenticate OK and both ID and access tokens are present when I do a network trace.
However, on the API side I get an error:
"IDX10511: Signature validation failed. Keys tried: 'Microsoft.IdentityModel.Tokens.X509SecurityKey, KeyId: '1E50B4475DAC931359D564309A3385FFAB7FB431', InternalId: 'f61f7746-3cff-4557-8b2c-b47fad9cf1e3'. , KeyId: 1E50B4475DAC931359D564309A3385FFAB7FB431"
Decoding the access token shows:
"{
"typ": "JWT",
"nonce": "G0Q6_BuYJUfZaBnX-l1Ox1eoncxXRT4KMThFBcn1-VA",
"alg": "RS256",
"x5t": "HlC0R12skxNZ1WQwmjOF_6t_tDE",
"kid": "HlC0R12skxNZ1WQwmjOF_6t_tDE"
}"
Googling this, it appears that the signature fails because of the nonce in the header and this requires "special processing".
All the validation is being done by OWIN.
Any idea what this is or how to fix this?