title: Insufficient Permissions with Access Token to Azure Data Catalog
body: <p>I'm trying to issue an API call to Azure Data Catalog using a Client Secret, however I get a Permission denied error. </p>
  
  <p>I'm able to create the token and I've given the client application the necessary permissions in AAD.</p>
  
  <p>If I change the authentication method to use delegated access where the user signs in, it works but if i try to use a client secret the generated token does not have the proper permissions.</p>
  
  <p>Here's some code that I've altered using various samples </p>
  
  <p>The token from this code works</p>
  
  <pre><code>//get the token
  
  authResult = await authContext.AcquireTokenAsync(resourceUri, clientId, new Uri(redirectUri), new PlatformParameters(PromptBehavior.Always));
  
  //the token from this code doesn't work
  
  IConfidentialClientApplication app;
  
  app = ConfidentialClientApplicationBuilder.Create(clientId)
                  .WithClientSecret(clientSecret)
                  .WithAuthority(new Uri(authorityuri))
                  .Build();
  
  string[] scopes = new string[] { "https://api.azuredatacatalog.com/.default" };
  
  result = await app.AcquireTokenForClient(scopes);
  </code></pre>
  
  <p>I get this error The remote server returned an error: </p>
  
  <blockquote>
    <p>(403) AccessDenied : Access denied..</p>
  </blockquote>