title: The client xxx with object id xxx does not have authorization to perform action Microsoft.Resources/subscriptions/resourcegroups/write' over scope
body: <p>I am trying to create a Resource Group dynamically using Azure Management SDK
  Here are my azure configuration details</p>
  
  <pre><code>subscription=&lt;private-data&gt;
  client=&lt;private-data&gt;
  key=&lt;private-data&gt;
  tenant=&lt;private-data&gt;
  managementURI=https://management.core.windows.net/
  baseURL=https://management.azure.com/
  authURL=https://login.windows.net/
  graphURL=https://graph.windows.net/
  </code></pre>
  
  <p>Here is code for creating Resource</p>
  
  <pre><code>// Credentials
  AzureCredentials credentials = new AzureCredentialsFactory()
      .FromFile("azureauth.properties");
  string resourceName = GetRandomString();
  
  // Create Azure Instance
  var azure = Azure
          .Configure()
          .Authenticate(credentials)
          .WithDefaultSubscription();
  
  // Create a Resource Group
  azure.ResourceGroups
          .Define(resourceName)
          .WithRegion(Region.USWest)
          .Create();
  </code></pre>
  
  <p>The error that I got is:</p>
  
  <blockquote>
    <p>The client 'ae8bc2ea-9680-4f66-934c-ad40b82c30ac' with object id
    'ae8bc2ea-9680-4f66-934c-ad40b82c30ac' does not have authorization to
    perform action
    'Microsoft.Resources/subscriptions/resourcegroups/write' over scope
    '/subscriptions/e9d61100-a82a-48ca-b6f8-51b06a1eebe6/resourcegroups/5oxjhjic'.</p>
  </blockquote>
  
  <p>I have followed steps specified on <a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal" rel="noreferrer">https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal</a><br>
  As well as I am trying with my <strong>Global Administrator</strong> account</p>