I’ve noticed a problem with using OpenID Connect to use AzureAD accounts to log in. It is a similar error to my other post about multi-tenant authentication although it only happens on first login and then allows you to log in if you try again (which the multi-tenant setup doesn’t).
If I enable debug logging I get the following on the first login attempt:
09:13:01 [Debug] PowerShellExecutionService ExecutionService constructor
09:13:01 [Error] Microsoft.AspNetCore.SignalR.HubConnectionHandler Error when dispatching ‘OnDisconnectedAsync’ on hub.
09:13:01 [Error] Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager Failed disposing connection htj5mJ9WpGIAekAq84gPZQ.
09:13:01 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 54982260.1747ms 101
09:13:04 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 POST http://localhost:10000/signin-callback application/x-www-form-urlencoded 3704
09:13:04 [Warn] Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler ‘.AspNetCore.Correlation.OpenID.n6gG3rnm99YievWLZoOs08a67lprB_EIpHcw1GzRrRE’ cookie not found.
09:13:04 [Info] Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler Error from RemoteAuthentication: Correlation failed…
09:13:04 [Error] Microsoft.AspNetCore.Server.Kestrel Connection id “0HLURMI57CPEV”, Request id “0HLURMI57CPEV:00000001”: An unhandled exception was thrown by the application.
09:13:04 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 4.3703ms 500
After doing a bit more testing I’ve noticed:
The account I’m logging in with is already ‘signed in’ to AzureAD (which is quite normal):
If I sign out of the account then re-load and log back into the dashboard again I can get in first try. The same also happens when using an in-private browser session, as it isn’t already signed in and prompts for credentials the first time, it is able to log into the dashboard first time. It seems to only happen when the account you try to log in with is already signed in to Azure AD.
@adam do you know if there are any updates on this issue? I’m getting close to releasing a product which uses UD and it’s going to be a real issue for me as it gives users a really bad experience if they get http500 errors every time they try to log in.