title: AzureCliCredential giving error, Please run 'az login' to set up account
body: <p>I am using <code>ChainedTokenCredential</code> and trying to get managed identity token in local debug environment using <code>Visual Studio 2019</code>. In windows terminal I already logged in using <code>Azure CLI</code> <code>az login</code>.</p>
  <pre><code>var credential = new ChainedTokenCredential(
                      new ManagedIdentityCredential(),
                                  new AzureCliCredential());
  
  var token = await credential .GetTokenAsync(new TokenRequestContext(new[] { _configuration.GetSection(&quot;scope&quot;).Value }));
  </code></pre>
  <p>When I am running code in debug I am seeing below error,</p>
  <blockquote>
  <p>The ChainedTokenCredential failed to retrieve a token from the included credentials.
  ManagedIdentityCredential authentication unavailable. No Managed Identity endpoint found.
  Please run 'az login' to set up account</p>
  </blockquote>
  <p>Where I need to do <code>az login</code>? Thanks.</p>