title: Getting Authorization has been denied for this request in Fiddler with Azure AD
body: <p>I have created a ASP.Net Web API (.Net Framework) app with "Work or School Accounts" as authentication type. This automatically registers this API app in my Azure subscription and I can see it under <a href="https://i.stack.imgur.com/7kM3B.png" rel="nofollow noreferrer">"App Registrations"</a>. I can see that Home Page Url is pointing to <a href="https://i.stack.imgur.com/vDafE.png" rel="nofollow noreferrer">localhost address</a>. I can see that API is launching locally on localhost address. I then launch Fiddler to get access token from Azure AD. My POST request to endpoint <code>https://login.microsoftonline.com/&lt;mytenant&gt;.onmicrosoft.com/oauth2/token</code>. has following 4 parameters </p>
  
  <pre><code>grant_type=client_credentials
  &amp;client_id=&lt;appid from Azure AD Portal&gt;
  &amp;client_secret=&lt;secret from Azure AD Portal&gt;
  &amp;resource=&lt;appid from Azure AD Portal&gt;
  </code></pre>
  
  <p>I get a token back. When I decode this token, I see <code>aud</code> and <code>appid</code> as expected(matching appid in Azure AD). I use this token as bearer token to invoke API call by adding <code>Authorization: Bearer &lt;mytoken&gt;</code> header in GET request to <code>https://localhost:44374/api/values</code>. However, this GET call to my API is returning me <code>{"Message":"Authorization has been denied for this request."}</code> error message. </p>
  
  <p>What am I missing?</p>