Recently, I got the requirement to retrieve the lists of storage account keys from one of my storage accounts. In this article, let me walk you through the syntax and usage of the az storage account keys list Azure CLI command with specific examples.
Table of Contents
az storage account keys list
This Azure CLI command helps you to get the lists of Azure storage account keys under a specified Azure storage account.
Syntax
Below is the syntax of the Azure CLI command for the Az storage account keys list.
az storage account keys list --resource-group YourResourceGroupName --account-name Yourstorageaccountnameaz storage account keys list -g YourResourceGroupName -n YourstorageaccountnameExample
The below example will retrieve the keys lists of the azureusanew storage account that belongs to the
az storage account keys list --resource-group MyNewResGrp --account-name azureusanewAfter executing the above command, I got the expected output successfully as shown below.
[
{
"creationTime": "2024-11-17T14:21:08.111950+00:00",
"keyName": "key1",
"permissions": "FULL",
"value": "JgWLDQKquntT4jHuj/0FkviJaw/8Y/xgMxcvMdyE8rLn3h9kfUuJgIkq8slnkm+QBI64S3U6t2/s+AStvypiww=="
},
{
"creationTime": "2024-11-17T14:21:08.111950+00:00",
"keyName": "key2",
"permissions": "FULL",
"value": "JlBMGRx9VHaeYOhmON62FKP9jIFbSOE5m1kNnxc/0ep5fMKeV8gAzY/GmGei7PmLYLYkHrXMXMfE+AStRiCfuw=="
}
]You can see the same output as shown in the screenshot below.

Alternatively, You can execute the az storage account keys list command like the one below.
az storage account keys list -g MyNewResGrp -n azureusanewAfter executing the above command, I got the same expected output as shown in the screenshot below.

You may also like following the articles below

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
