title: Generating SAS to access Azure storage
body: <p>I am trying to write a Bash script that would take backup of an Azure App service and save the backup into a container in Azure storage. </p>
  
  <p>To do so, I need a SAS to access the storage and to generate one I would use the following command:</p>
  
  <pre><code>az storage blob generate-sas -c containername --account-name storage-account-name -n blob-name
  </code></pre>
  
  <p>The problem here is, I also need to provide the blob name for the above command to work, but I would like my backup to be stored directly in the container.</p>
  
  <p>But if I am using Powershell and follow the document <a href="https://docs.microsoft.com/en-us/azure/app-service/app-service-powershell-backup" rel="nofollow noreferrer">here</a> it doesn't require a blob storage name to create a SAS.</p>
  
  <p>So I was wondering if there's a way to generate SAS using Azure-CLI that is valid on the container level and not on the blob level.</p>