Azure AD Unknow location error

Hi, I'm trying my first blazor server app using Azure AD authentication. I configured security following documentation instructions, however when I tried to access a private page this error appear:

dotnet: warn: Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler[15]
'.AspNetCore.Correlation.AzureADOpenID.7WKUXH92Dh1jGrYk3x18Ef4koOTNPDFzc9XvGXqmty0' cookie not found.

dotnet: info: Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler[4]
Error from RemoteAuthentication: Correlation failed..
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
System.Exception: An error was encountered while handling the remote login.
---> System.Exception: Correlation failed.
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

What's wrong?



We haven't seen this error before. I searched online and found that it could be caused by a few things. One is related to some Chrome security settings which should be solvable with this code.. The other seems to be related to Azure deployments and load balancers. Not sure if this is the case for you. There is also this blog post which suggests a different solution:

One thing you can try is using Incognito mode to see if it isn't a caching issue. In addition you can try logging with a different browser to rule out the Chrome security settings.