title: Failing to authenticate BlobServiceClient and Azure AD
body: <p>I'm having issues using bloblserviceClient with azure Ad</p>
  <p>I'm logged into account &quot;X&quot; in visual studio and also tools =&gt; optios =&gt; azure service authentication = account &quot;X&quot;</p>
  <p>This is the following code</p>
  <pre><code>var uri = new Uri(&quot;https://testblob112.blob.core.windows.net/order&quot;);
  
  var cred = new DefaultAzureCredential();
  
  var client = new BlobClient(uri, cred);
  
  await client.UploadAsync(&quot;test.txt&quot;);
  </code></pre>
  <p>User X also has Storage contributor access to the storage account order.</p>
  <p>I'm getting the following error</p>
  <blockquote>
  <p>ure.Identity.AuthenticationFailedException: SharedTokenCacheCredential authentication failed: AADSTS9002332: Application 'e406a681-f3d4-42a8-90b6-c2b029497af1'(Azure Storage) is configured for use by Azure Active Directory users only. Please do not use the /consumers endpoint to serve this request.</p>
  </blockquote>
  <p>Am I missing anything?</p>