title: Error : Tenant authorize not found. This may happen if there are no active subscriptions for the tenant
body: <p>I have written the following code to acquire token for CRM.</p>
  
  <pre><code>class Program
  {
      private const string username = "richa@azuretraining112.onmicrosoft.com";
      private const string password = "Pa$$w0rd";
      private const string serviceURL = "https://azuretraining112.crm8.dynamics.com";
      private const string applicationID = "89a70b76-3a71-481f-8755-a7aa97c59c35";
      private const string redirectURL = "https://localhost1";
      private const string authorityURI = "https://login.microsoftonline.com/1d54ea41-cd25-488f-812c-c078e6114065/oauth2/authorize";
      private static AuthenticationResult authResult = null;
  
  
      private static void Main(string[] args)
      {
          var credentials = new UserPasswordCredential(username, password);
          var context = new AuthenticationContext(authorityURI);
          authResult = context.AcquireTokenAsync(serviceURL, applicationID, credentials).Result;
      }
  }
  </code></pre>
  
  <p>But, while running the code, I am getting the following error while trying to get the token using AcquireTokenAsync.</p>
  
  <blockquote>
    <p><a href="https://i.stack.imgur.com/5c2kR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5c2kR.png" alt="Blockquote"></a></p>
  </blockquote>
  
  <p>I have added an application user using the application ID : 
  <a href="https://i.stack.imgur.com/M0wF7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/M0wF7.png" alt="enter image description here"></a></p>
  
  <p>I don't know what I am missing. Please help!</p>
  
  <p>I tried with the solution given in <a href="https://stackoverflow.com/questions/53645374/error-aadsts90002-on-aquire-authentication-token-for-dynamics-365">Tenant not authorized</a>, but, nothing worked.</p>
  
  <p>Thanks!</p>