title: Python azure-identity ClientSecretCredential
body: <p>I’m trying to get an access token via the azure-identity python package for accessing an Azure Service. I done the app registration in the Azure AD and I got the following C# code, which works as expected:</p>
  <pre><code>private static async Task&lt;string&gt; GetAccessToken(string aasUrl)
  {
      var tenantId = &quot;&lt;&gt;&quot;;
      var appId = &quot;&lt;&gt;&quot;;
      var appSecret = &lt;&gt;;
      string authorityUrl = $&quot;https://login.microsoftonline.com/{tenantId}&quot;;
  
      var authContext = new AuthenticationContext(authorityUrl);
  
      // Config for OAuth client credentials 
      var clientCred = new ClientCredential(appId, appSecret);
      AuthenticationResult authenticationResult = await authContext.AcquireTokenAsync(aasUrl, clientCred);
  
      //get access token
      return authenticationResult.AccessToken;
  }
  </code></pre>
  <p>But when I try to redo the C# in python, I can’t get the get_token(scode:str) to work…I simply do not get what scope to pass into the get_token function.</p>
  <pre><code>from azure.identity import ClientSecretCredential
  
  authority = 'https://login.microsoftonline.com'
  
  credential = ClientSecretCredential(tenant_id, client_id, client_secret, authority=authority)
  
  token = credential.get_token(scope:str) #scope?
  
  </code></pre>
  <p>When I use the .net Microsoft.IdentityModel.Clients.ActiveDirectory library I don’t have to think about scope.</p>