Is there a way to retrieve the shared key from the Azure Blob Storage Account using API calls

Viewed 128

I was able to create new Storage account by making rest API call and using info (client id, secret, etc) of the principal which I created for this purpose. After creation of the new azure storage account I would like to continue (create containers, upload blobs etc) by using this account but for that I need the access key which I am not able (for now) to get from the API.

Is there a way to do this or I need to go to Azure portal after creation of each storage account and to pick the access key from there?

Mirko

1 Answers

Everything you can do in the Azure portal can be done with a REST API.

And almost everything is also available in Powershell and the Azure CLI.

The service teams ship the REST API changes when they make changes to the servcie. Those changes sometimes take some time to appear in the PowerShell, CLI and the language APIs.

See https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-powershell

And I believe the REST API is https://docs.microsoft.com/en-us/rest/api/storagerp/storageaccounts/listkeys

Related