title: WebAPI How to allow LocalHost debugging on Azure AD Protected web api
body: <p>I have setup my web api to required authentication with Azure AD.</p>
  
  <p>This is a multistep configuration</p>
  
  <ol>
  <li>On Startup.Auth.cs</li>
  </ol>
  
  <pre><code> public void ConfigureAuth(IAppBuilder app)
              {
                  app.UseWindowsAzureActiveDirectoryBearerAuthentication(new WindowsAzureActiveDirectoryBearerAuthenticationOptions
                  {
                      Tenant = ConfigurationManager.AppSettings["ida:Tenant"],
                      TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
                      {
                          ValidAudience = ConfigurationManager.AppSettings["ida:Audience"]
                      }
                  });
              }
  </code></pre>
  
  <ol start="2">
  <li>On Azure AD I setup an App Registration and setup the Redirect URLs</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/VjTzF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VjTzF.png" alt="enter image description here"></a></p>
  
  <p>However when I test the endpoints locally from Swagger interface I get this error:
  "Authorization has been denied for this request."</p>
  
  <p>Everything works when deployed to Azure, but to save time Id like to be able to debug locally.</p>