title: Azure CLI - How to find available 'endpoints' from an account key?
body: <p>I have an account key and corresponding account name.  How can I find the storage options it has?</p>
  <p>Using:
  az storage account list
  retrieves the accounts that my subscription has access to, and I get the access points:</p>
  <pre><code>   &quot;primaryEndpoints&quot;: {
        &quot;blob&quot;: &quot;https://MYACCOUNT.blob.core.windows.net/&quot;,
        &quot;dfs&quot;: &quot;https://MYACCOUNT.dfs.core.windows.net/&quot;,
        &quot;file&quot;: &quot;https://MYACCOUNT.file.core.windows.net/&quot;,
        &quot;internetEndpoints&quot;: null,
        &quot;microsoftEndpoints&quot;: null,
        &quot;queue&quot;: &quot;https://MYACCOUNT.queue.core.windows.net/&quot;,
        &quot;table&quot;: &quot;https://MYACCOUNT.table.core.windows.net/&quot;,
        &quot;web&quot;: &quot;https://MYACCOUNT.z6.web.core.windows.net/&quot;
     }
  </code></pre>
  <p>I want to obtain a similar endpoint for an account for which I have an account key, how to do this?</p>
  <p>Then, if there is a 'blob' access point, I know that I can call:</p>
  <p><code>az storage fs list --account-name &quot;MYACCOUNT&quot; --account-key &quot;MYKEY&quot; </code></p>
  <p>to get the list of blob containers.</p>
  <p>Bonus question: how to know whether the key is for a Gen1 or Gen2 type account?</p>