title: What is the difference between UseWindowsAzureActiveDirectoryBearerAuthentication with UseOpenIdConnectAuthentication?
body: <p>I have webapi which is registered into azure AD.
  which is having below code in Startup.Auth.cs</p>
  
  <pre><code>   public void ConfigureAuth(IAppBuilder app)
          {
              app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
              app.UseCookieAuthentication(new CookieAuthenticationOptions());
              app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
              {
                  ClientId = ClientId,
                  Authority = Authority,
                  PostLogoutRedirectUri = PostLogoutRedirectUri
              });
  </code></pre>
  
  <p>When I run this webapi in browser it ask for login and after login success able to see all api's url.</p>
  
  <p>I'm trying to access this secured api from web app which is register into same azure AD. </p>
  
  <p>When I use <code>AcquireTokenAsync</code> into Webapp to generate access token for this webapi it works but gives login html page as response.</p>
  
  <p>To avoid this I tried to generate silent token using <code>AcquireTokenSilentAsync</code> but exception occurs <code>unable to generate token cache not found</code> but cache key found still exception there .</p>
  
  <p>After some google git post suggest to use <code>UseWindowsAzureActiveDirectoryBearerAuthentication</code> this code into WebApi and they said it will return output of api when call from webapp instead login page output , but it doesn't work.</p>
  
  <pre><code> app.UseWindowsAzureActiveDirectoryBearerAuthentication(
                  new WindowsAzureActiveDirectoryBearerAuthenticationOptions
                  {
                      Audience = ConfigurationManager.AppSettings["ida:Audience"],
                      Tenant = ConfigurationManager.AppSettings["ida:Tenant"],
                      TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
                      {
                          ValidateIssuer = false
                      }
                  });
  </code></pre>