Base solution for your next web application
Open Closed

Enabled Openidconnect for Azure Ad Login #11280


User avatar
0
kansoftware created

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 8.1
  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? .net core

issue is

We have setup everything Authority, Client ID, secret but when it redirects back it gives error SecurityTokenSignatureKeyNotFoundException: IDX10501: Signature validation failed. Unable to match key: kid: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. Exceptions caught:

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

7 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you set IdentityModelEventSource.ShowPII = true; ? It will alllow you to see the full error message.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    kansoftware created

    Where we have to put this line of code?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Sorry for the late reply. You can place it in AuthConfigurer.cs class under Startup folder right before the line below.

    IdentityModelEventSource.ShowPII = true;
    authenticationBuilder.AddOpenIdConnect
    
    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    kansoftware created

    Hi,

    After enabling the same we are getting following error let us know how we can resolve the same

    Regards, Harshit

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Is your initial URL where you start the OpenID Connect flow is localhost as well ? If not, maybe this can help you, https://stackoverflow.com/a/58877655.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    kansoftware created

    Yes. its localhost as we are trying to test in debug mode using Visual studio. and the same error come on production URL

    I saw the link but need you help how we can use it.

    Thanks Harshit

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @kansoftware

    Could you send an email to [email protected] about this error ? We might need some private information, so it will be better to continue via email.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)