Reputation: 29
I Am using AzureCLI in my machine to download and list blobs from Azure. I have tried to list the Blobs using Account key which worked as expected. But, when I try to list it using SAS Token am getting the below-mentioned exception,
** Command:**
C:\Users\22222>az storage blob list -c containerName --account-name accountName -o table --sas-token sp=r&st=2018-10-16T12:53:16Z&se=2018-10-16T20:53:16Z&spr=https&sv=2017-11-09&sig=d%2asdfasdfewerasdf$#$%#$%#$A%3D&sr=b
Note: I got this SAS Token from Azure portal
The specified resource does not exist.ErrorCode: ResourceNotFound
<?xml version="1.0" encoding="utf-8"?><Error><Code>ResourceNotFound</Code><Message>The specified resource does not exist. RequestId:a108a8f9-d01e-000d-6a6c-6b0194000000 Time:2018-10-24T07:38:04.5834052Z</Message></Error>
Upvotes: 0
Views: 2228
Reputation: 24549
I also reproduce the issue if not put sas-token in qutotation marks. Please have a try to enclose the sastoken string in quotation marks.
az storage blob list -c containerName --account-name accountName -o table --sas-token "sp=r&st=2018-10-16T12:53:16Z&se=2018-10-16T20:53:16Z&spr=https&sv=2017-11-09&sig=d%2asdfasdfewerasdf$#$%#$%#$A%3D&sr=b"
Test Result:
Note: Make sure that your sas token is vaild.
Upvotes: 3