Base solution for your next web application
Open Closed

OpenId with Azure AD exception from _externalAuthManager.GetUserInfo #11507


User avatar
0
Anshu created

Version 8.7 .NET Core with Angular

We are looking to enable OpenId with Azure AD for existing application running in production. Have pass in the appsettings openid section values as below from azure app registration clientid and tenantid values..

"OpenId": { "IsEnabled": "true", "loginUrl": "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize", "ClientId": "{clientid}", "Authority": "https://login.microsoftonline.com/{tenantid}/v2.0", "ValidateIssuer": "false", "ClaimsMapping": [ { "claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", "key": "http://schemas.microsoft.com/identity/claims/objectidentifier" } ] },

But while testing we are getting exception inlocalhost and azure deployment as well from **TokenAuthController ****GetExternalUserInfo **method call.

Exception message from stack trace : Sequence contains no matching element thrown from _externalAuthManager.GetUserInfo(model.AuthProvider, model.ProviderAccessCode).

Please suggest..!!


1 Answer(s)