title: Azure AAD - The audience is invalid
body: <p>I have create a webapi secured with azure active directory. I need to test this now and trying to use fiddler with an authorization header. I am trying to generate the token with below code.</p>
  
  <pre><code>Target obj = (Target)cmbTarget.SelectedItem;
  
  AuthenticationResult authenticationResult;
  string aadInstance = obj.AADInstance; // "https://login.windows.net/{0}";
  string tenant = obj.Tenant; //"rudderless.onmicrosoft.com";
  string apiResourceId = obj.ApiResourceId; //"15b4ac7f-23a8-4958-96a5-64159254690d";
  string clientId = obj.ClientId; // "47cdc6c3-226a-4c38-b08e-055be8409056";
  
  Uri redirectUri = new Uri(obj.RedirectUri); //new Uri("http://nativeclient");
  string authority = string.Format(aadInstance, tenant);
  authContext = new AuthenticationContext(authority);
  
  authenticationResult = this.authContext.AcquireToken(apiResourceId, 
                              clientId, redirectUri, PromptBehavior.Always);
  
  txtToken.Text = authenticationResult.AccessToken;
  Clipboard.SetText($"Bearer {txtToken.Text}");
  </code></pre>
  
  <p>I get the token generated successfully and when I am using the token to call the webapi it throwing 401 with message </p>
  
  <blockquote>
    <p>WWW-Authenticate: Bearer error="invalid_token", error_description="The
    audience is invalid"</p>
  </blockquote>