Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "entripy"

I was working with the 6.7 framework. Regenerating from 6.9 and comparing changes, it now works.

I tried that already. its not working.

Hi @cmthomps,

Thanks for sharing. It is working after putting the OnTicketReceived event handler in.

Thanks @cmthomps Thanks @ismcagdas

Tried to use the suggested authority. No change. Values available in Token but 'GetExternalLoginInfoAsync' returns null.

Hi ismcagdas,

unique_name was missing in the Azure AD V2 token. I switched to Azure AD V1 token and all three claims (name, unique_name and aud) have values now. But 'GetExternalLoginInfoAsync' still returns null.

Thanks, Keith

Hi ismcagdas,

I examined the id_token in the response form data from "http://localhost:62114/signin-oidc". It is an Azure AD V2 token with claim [preferred_username] value be the same as the logon name I used. Seems authenticate with Azure AD is working.

The question is why "GetExternalLoginInfoAsync" is still returning null.

Thank you.

Hi,

There are no errors in Log.txt. The followings are part of log related to the external login. The last line is the log after 'ExternalLoginCallback' return null

INFO 2018-11-06 09:52:45,580 [8 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method MyTestProject.Web.Controllers.AccountController.ExternalLogin (MyTestProject.Web.Mvc) with arguments (OpenIdConnect, /App, ) - Validation state: Valid INFO 2018-11-06 09:52:47,753 [8 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method MyTestProject.Web.Controllers.AccountController.ExternalLogin (MyTestProject.Web.Mvc), returned result Microsoft.AspNetCore.Mvc.ChallengeResult in 2172.7945ms. INFO 2018-11-06 09:52:47,936 [8 ] Microsoft.AspNetCore.Mvc.ChallengeResult - Executing ChallengeResult with authentication schemes (OpenIdConnect). INFO 2018-11-06 09:52:49,461 [19 ] ation.OpenIdConnect.OpenIdConnectHandler - AuthenticationScheme: OpenIdConnect was challenged. INFO 2018-11-06 09:52:49,465 [19 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action MyTestProject.Web.Controllers.AccountController.ExternalLogin (MyTestProject.Web.Mvc) in 5905.7891ms INFO 2018-11-06 09:52:49,465 [19 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 6361.7538ms 302 INFO 2018-11-06 09:52:50,225 [8 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 POST http://localhost:62114/signin-oidc application/x-www-form-urlencoded 1779 INFO 2018-11-06 09:52:53,453 [8 ] tion.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.External signed in. INFO 2018-11-06 09:52:53,481 [8 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 3255.3743ms 302 INFO 2018-11-06 09:52:53,530 [4 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:62114/Account/ExternalLoginCallback?ReturnUrl=%2FApp&authSchema=OpenIdConnect
INFO 2018-11-06 09:52:54,100 [4 ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {action = "ExternalLoginCallback", controller = "Account", area = ""}. Executing action MyTestProject.Web.Controllers.AccountController.ExternalLoginCallback (MyTestProject.Web.Mvc) INFO 2018-11-06 09:52:54,984 [4 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method MyTestProject.Web.Controllers.AccountController.ExternalLoginCallback (MyTestProject.Web.Mvc) with arguments (/App, , ) - Validation state: Valid WARN 2018-11-06 09:53:07,779 [4 ] roject.Web.Controllers.AccountController - Could not get information from external login.

Showing 1 to 7 of 7 entries