title: Retrieve Azure storage account key using Azure CLI
body: <p>In my release pipeline I'm using a Azure CLI to transfer my build files to a Azure storage blob:</p>
  
  <pre><code>call az storage blob upload-batch --source "$(System.DefaultWorkingDirectory)/_ClientWeb-Build-CI/ShellArtifact/out/build" --destination "$web" --account-key "****QxjclDGftOY/agnqUDzwNe/gOIAzsQ==" --account-name "*****estx"
  </code></pre>
  
  <p>This works, but I want to retrieve the <code>account-key</code> dynamically. </p>
  
  <p>When I use:</p>
  
  <pre><code>az storage account keys list -g CustomersV2 -n ****estx
  </code></pre>
  
  <p>I get a array with 2 objects, both holding a key value:</p>
  
  <pre><code>[
      {
      "keyName": "key1",
      "permissions": "Full",
      "value": "f/eybpcl*****************Vm9uT1PwFC1D82QxjclDGftOY/agnqUDzwNe/gOIAzsQ=="
      },
      {
      "keyName": "key2",
      "permissions": "Full",
      "value": "bNM**********L6OxAemK1U2oudW5WGRQW++/bzD6jVw=="
      }
  ]
  </code></pre>
  
  <p>How do I use one of the two keys in my <code>upload-batch</code> command?</p>