title: Active Directory Authentication Exception (AADSTS90027) with Azure AD
body: <p>I have a native client application which is obtaining an OAuth2 token for Active Directory authorization. It will then use that token to communicate with a secure Web API server where certain areas of the API are secured using the <code>[Authorize]</code> attribute. The server is also registered with Azure AD and can properly authorize requests through AD.</p>
  
  <p>When I try to get the token, I get the following exception on Line 2 of the code below:</p>
  
  <blockquote>
    <p>Additional information: invalid_request: AADSTS90027: The client '&lt;Client GUID&gt;' and resource '<a href="https://abccompany.com/MyApplication.Server" rel="nofollow">https://abccompany.com/MyApplication.Server</a>' identify the same application.</p>
  </blockquote>
  
  <p>Here is my code which I am running in the native client (just on a button press as a test, for now). Obviously the GUID and company names have been obfuscated.</p>
  
  <pre><code>AuthenticationContext ac = new AuthenticationContext("https://login.windows.net/abccompany.com");
  AuthenticationResult ar = ac.AcquireToken("https://abccompany.com/MyApplication.Server", "&lt;Client GUID&gt;", new Uri("https://localhost:44300/secure"), PromptBehavior.Auto);
  </code></pre>
  
  <p>I made sure the redirect existed in Azure in the application configuration (otherwise there would have been a redirect error instead). What does the error mean?</p>