Error IDX10500 with Azure AD B2C CustomPolicy

31 Views Asked by At

I'm trying to handle the AddMicrosoftIdentityWebApp in .NET 8 (Blazor Web App) with Azure AD B2C. I have some CustomPolicy that should be okay. But after clicking local account login, I got the following error.

IDX10500: Signature validation failed. No security keys were provided to validate the signature.

Where can i add/find this security key or what is it?

1

There are 1 best solutions below

0
juunas On

Check to make sure your Authority is configured as something like:

https://yourb2ctenant.b2clogin.com/yourb2ctenant.onmicrosoft.com/B2C_1A_YOUR_CUSTOM_POLICY/v2.0

This leads to it downloading OpenID configuration from:

https://yourb2ctenant.b2clogin.com/yourb2ctenant.onmicrosoft.com/B2C_1A_YOUR_CUSTOM_POLICY/v2.0/.well-known/openid-configuration

That document contains the jwks_uri where the signing keys are. Typically the libraries should handle all this for you. I don't have time right now to check how exactly that API works that you are using. But ultimately the above is what it needs to end up at.