question

AdelMozip-3624 avatar image
0 Votes"
AdelMozip-3624 asked JamesTran-MSFT commented

SSO and token error when setting up a project

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?

azure-active-directory
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AdelMozip-3624 , are you following any documentation or tutorials for this?

0 Votes 0 ·

1 Answer

JamesHamil-MSFT avatar image
0 Votes"
JamesHamil-MSFT answered JamesTran-MSFT commented

Hi @AdelMozip-3624 , 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

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for your response, it seemed like my azure registration had issues, so I recreated the app registration and it worked fine :)

0 Votes 0 ·

@AdelMozip-3624
Thank you for the follow up on this and I'm glad that James was able to help resolve your issue!


If you have any other questions, please let us know.
Thank you for your time and patience throughout this issue.


Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

0 Votes 0 ·