SSO and token error when setting up a project

Adel Mozip 1 Reputation point
2021-10-20T15:38:25.563+00:00

I'm getting an error right after setting up azure ad authentication.

An unhandled exception occurred while processing the request.
SecurityTokenSignatureKeyNotFoundException: IDX10501: Signature validation failed. Unable to match key:
kid: 'System.String'.
Exceptions caught:
'System.Text.StringBuilder'.
token: 'System.IdentityModel.Tokens.Jwt.JwtSecurityToken'.
Microsoft.IdentityModel.Tokens.InternalValidators.ValidateLifetimeAndIssuerAfterSignatureNotValidatedJwt(SecurityToken securityToken, Nullable<DateTime> notBefore, Nullable<DateTime> expires, string kid, TokenValidationParameters validationParameters, StringBuilder exceptionStrings)

Exception: An error was encountered while handling the remote login.
Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler<TOptions>.HandleRequestAsync()

I am not using JWT tokens. I have double checked the credentials and urls.

What could I be missing?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-10-29T23:49:01.033+00:00

    Hi @Adel Mozip , It's very hard to trace the issue without seeing the code. If you can post the code I can look into a fix for you. If you were following a document or sample I would suggest deleting it and starting over. Sometimes environmental errors can occur. Please let me know if you resolve the issue.

    Best,
    James


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.