title: Issue with ADFS with Web Api controller not redirecting to the ADFS login page
body: <p>I am facing issues with the same issue and your help will be appreciated. I have an application with AngularJS + webAPI + SQL Server, in this application I need to integrate AFDS, I have created a POC with MVC and it is working fine calling ADFS and giving me claims and all that. But when I am integrating with AngularJS + web API, this is not working.</p>
  
  <p>My application structure is UI is created in AngularJS which is calling Web API, and the account controller is in Web API, where I create two login routes Login/LoginADFS, but I am not able to redirect to the ADFS login page from the controller.</p>
  
  <p>Code is as below:</p>
  
  <p>AccountController:</p>
  
  <pre><code>ADFSLogin()
  
  {
  
  if(!User.Identity.IsAuthenticated)
  
  {
  
  HttpContext.Current.GetOwinContext().Authentication.Challenge(new AuthenticationProperties{ RedirectUri="/"}, WsFedrationAuthencationDefaults.AuthenticationType);
  
  }
  
  Startup.Auth.cs:
  
  app.UseWsFedrationAuthentication(new WsAuthenticationOptions{
  
  Wtrealm=Startup.realm,
  
  MetadataAddress=Startup.adfsMetaData
  
  })
  </code></pre>
  
  <p>I can share more code details if required.</p>
  
  <p>Your help will be appreciated.</p>