title: List databases in a CosmosDB instance using the AZ command line
body: <p>I'm attempting to list all Databases from a CosmosDB instances using the AZ command line -</p>
  
  <pre><code>az account set --subscription $subscriptionId
  az cosmosdb database list --name $cosmosName --resource-group $resourceGroup
  </code></pre>
  
  <p>The above command is resulting the following response -</p>
  
  <blockquote>
    <p>Operation Failed: Resource Not Found</p>
  </blockquote>
  
  <p>When adding the <code>--debug</code> argument I'm presented with the above error as well as the below detail -</p>
  
  <blockquote>
    <p>Status code: 404<br>
    {"code":"NotFound","message":"Entity with the specified id does not exist in the system.\r\nActivityId: d5383919-7c23-4158-bded-2c623d55ab9b, Microsoft.Azure.Documents.Common/2.0.0.0"}</p>
  </blockquote>
  
  <p>The CosmosDB that I am attempting to query absolutely does exist, derived by running the command <code>az cosmosdb list</code>, and I copied the SubscriptionId and ResourceGroup directly from the portal.</p>
  
  <p>The <a href="https://docs.microsoft.com/en-us/cli/azure/cosmosdb/database?view=azure-cli-latest" rel="nofollow noreferrer">MS docs</a> and the command <code>az cosmosdb database list --help</code> both seem to suggest what I'm doing should work.</p>
  
  <p>Can anyone suggest what I could do to fix the issue?</p>