0
votes

Is there any way to list SAS tokens of a storage account in Azure CLI? I can generate one and it spits out the generated token immediately. However, there seems to be no way to list/show/get the same token later using Azure CLI. I see it's possible in REST API but not in Azure CLI.

4

4 Answers

1
votes

There is no azure cli command to list SAS tokens of a storage account, all the commands here.

If necessary, you could post your idea in the feedback to improve it.

1
votes

SAS tokens must be generated for a specified scope and permissions, as well as a time frame in which they are valid. Listing SAS tokens for a storage account is NOT possible as a limitless number of tokens are valid.

To get a SAS-token for the same scope, you can pass in the same parameters from the previous generation.

0
votes

Just to make sure we are on the same page; which REST API is it that your are not able to reach from the Azure CLI?

Best regards, Johan Stenberg

0
votes

There is no way to track already issues SAS tokens. The rest API which you are referring is also created new token, It will not list the existing tokens.