Skip to content
Azure Lessons
Azure Lessons
  • Home
  • AWS
  • Azure VM
  • Azure AD
  • Azure tutorial
    • Azure Cognitive Services
    • Azure Machine Learning
    • Azure DevOps

What is Azure Storage Account Key

September 19, 2022 by Rajkishore
What is Azure Storage Account Key

In this Azure tutorial, we will discuss what is Azure storage account access key and Along with that, we will also discuss a few other topics.

Table of Contents

  • What is Azure Storage Account Key
  • How to get storage account access key Azure
  • Regenerate Storage account access key Azure
  • How to get Azure storage account access key using PowerShell
  • How to get Azure storage account access key using Azure CLI
  • Wrapping Up

What is Azure Storage Account Key

Azure storage account access keys are the keys that get generated by default when you create an Azure storage account. Those two access keys are used to authorize the access to the data inside your Azure Storage Account.

These master keys are of 512-bit.

Out of these two keys, you can use any one of the access key for the authorization process to access your Sorage Account.

How to get storage account access key Azure

Well, it’s quite easy to find storage account access key in Azure using the below steps in the Azure Portal.

  1. Log in to Azure Portal.
  2. Search for Storage accounts and click on the search result Storage accounts.
How do I find my Azure access key for storage

3. Now, you can able to see the lists of Storage accounts you have created. Click on the specific storage account for the one you wish to get the access key.

4. On the Storage account page, Under Security + networking, click on the Access keys link.

how to find azure storage account access key

5. You can able to see Key 1 and Key 2 on the right side. By default it is hidden, Click on the Show button for each one to view the key.

how to get azure storage account access key

Regenerate Storage account access key Azure

If you don’t want the old key and want to regenerate a new access key of your Azure Storage account, then you can click on the Rotate key button. But before that an important point to remember is, the old key is not recoverable.

how to get the access keys of your azure storage account

On the Regenerate access key pop-up, read the information properly, click on the Yes button to confirm the process of generating a new access key of your Azure Storage account.

how to view the access keys of your azure storage account

How to get Azure storage account access key using PowerShell

You can find Azure Storage account access key using Get-AzStorageAccountKey Azure PowerShell cmdlet.

Syntax:

Below is the syntax to retrieve Azure Storage Account access key.

Get-AzStorageAccountKey -ResourceGroupName "Your Resource group name" -Name "Storage account name"

Example: In the below example, DEMORG1 is the name of my Resource Group and demoggh is the name of my Azure Storage account.

Get-AzStorageAccountKey -ResourceGroupName "DEMORG1" -Name "demoggh"

After executing the above script, I got the below output

KeyName Value                                                                         
------- -----                                                                         
key1    1dMSmTL3GNTqBqpi+iSbfqDY/43rqthsWb/u1EVwiKZTXsS+urwmQ+xxxxxxL2md8aqVZtF4...
key2    vYQVP59KPHvBUqFcY3YP4Gl/GveV9HTnwIm0z+ZBvyHeuKHmxxxxxxxxxx+XIdZ2OnDY86m6Q...

You can see it here

How to get Azure storage account access key using PowerShell

How to get Azure storage account access key using Azure CLI

You can use Azure CLI to find your Azure Storage account using the below cmdlet.

az storage account keys list -g ResourceGroupname -n StorageAccountname

Example: Here, DEMORG1 is my Resource Group name and demoggh is my Azure Storage account name.

az storage account keys list -g DEMORG1 -n demoggh

After executing the above Azure CLI cmdlet, I got the below output.

[
  {
    "keyName": "key1",
    "permissions": "FULL",
    "value": "1dMSmTL3GNTqBqpi+iSbfqDY/43rqthsWb/u1EVwiKZTXsS+urwmQ+xxxxxxxx2md8aqVZt
F4C+AStq2JC8g=="
  },
  {
    "keyName": "key2",
    "permissions": "FULL",
    "value": "vYQVP59KPHvBUqFcY3YP4Gl/GveV9HTnwIm0z+ZBvyHeuKxxxxxxxxxxx+XIdZ2OnDY86m
6QK+AStIWwqVg=="
  }
]

You can see it here

How to get Azure storage account access key using Azure CLI

You may also like following the below articles

  • Azure storage types
  • Azure storage explorer
  • How to Upload and Download File From Azure Blob Storage Using C# and PowerShell
  • How to Create Azure Free Account (Step by Step tutorial)
  • How to Create a Recovery Services vault in Azure

Wrapping Up

Well, in this article, we discussed what is Azure storage account access key and how to get Azure storage account access key in Azure Portal, using PowerShell and using Azure CLI. Thanks for reading this article.

How to backup Azure storage account (Azure Portal)
Azure Rename Resource Group

Follow Us

Follow us on Twitter Subscribe us on Youtube

Recent Posts

  • How To use Azure Functions to Send And Read Messages From Azure Service Bus Queues
  • AWS Lambda vs Azure functions
  • How to Create Azure Free Account (Step by Step tutorial)
  • How to create a database in Azure Database for PostgreSQL flexible server
  • Azure PostgreSQL Flexible Server
  • About
  • Contact
  • Privacy Policy
  • Sitemap
© 2023 Azure Lessons