MVC5 OWIN ws federation AuthenticationManager.GetExternalLoginInfoAsync () returns null

I am trying to configure OWIN WS-Federation Integrated Authentication (ADFS) in a new MVC 5 project in Visual Studio 2013. The WsFederation in Startup.Auth is configured as follows:

app.UseWsFederationAuthentication(wtrealm: "MyRealm",
               metadataAddress: "https://myADFSInstanceHost/FederationMetadata/2007-06/FederationMetadata.xml");  

The federation button on the login page works fine. The ADFS login page is reachable, I can log in there. Required cookies seem to be set correctly. At least a .AspNet.ExternalCookie cookie is passed. But when the mvc application callback is executed, in the ExternalLoginCallback AuthenticationManager.GetExternalLoginInfoAsync () controller always returns null.

+4
source share

All Articles