In this Azure article, we will discuss where to find Azure storage account connection string from the Azure Portal and use PowerShell.
Table of Contents
- Azure Storage Account Connection String
- How to get Azure Storage Account Connection String using Azure Portal
- How to get Azure storage account connection string using PowerShell
- How to get Azure storage account connection string using Azure CLI
- How to get Azure Storage Account Connection String – Video Tutorial
- Wrapping Up
Azure Storage Account Connection String
The Azure Storage Account Connection String contains the information that is required to access the data from your Azure Storage account from your application.
How to get Azure Storage Account Connection String using Azure Portal
Follow the below steps to quickly find the Azure Storage Account Connection String from the Azure Portal.
- Log in to Azure Portal and navigate to your storage account.
- On the Storage account page, click on the Access keys link from the left navigation that is present under the Security + networking tab.

3. You will see the connection strings under the Key1 and key2. Click on the Show button next to the Connection string to see the value of the connection string.

Now copy the connection string and utilize it wherever you need it.
How to get Azure storage account connection string using PowerShell
Follow the below steps
- Open Windows PowerShell ISE with Run as administrator mode.
- Execute the below PowerShell command to get the details of the Azure storage account connection string.
$myrsg = "Demo123"
$mystrgact = "demo123b08c"
(Get-AzStorageAccount -ResourceGroupName $myrsg -Name $mystrgact).Context.ConnectionString
Note: Make sure to change the value for the name of the storage account and the Resource Group name as per yours.
After executing the above PowerShell script, I got the below output as expected.
BlobEndpoint=https://demo123b08c.blob.core.windows.net/;QueueEndpoint=https://demo123b08c.queue.core.windows.net/;TableEndpoint=https://demo123b08c.tabl
e.core.windows.net/;FileEndpoint=https://demo123b08c.file.core.windows.net/;AccountName=demo123b08c;AccountKey=177mjClvorkM5RzZwIM/EMaUQpJH+O1vFu1FwjvgL
q4xESDkJ3YCuF8On63+sm8XS3e+zizdzyKO+AStQYfGCQ==
You can see the same output below

How to get Azure storage account connection string using Azure CLI
You can also use the below command to get the Azure storage account connection string using Azure CLI.
az storage account show-connection-string --resource-group Demo123 --name demo123b08c
Note: Make sure to change the value for the name of the storage account and the Resource Group name as per yours.
After executing the above command, I got the below-expected output
"connectionString": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=demo123b08c;AccountKey=177mjClvorkM5RzZwIM/EMaUQpJH+O1vFu1FwjvgLq4xESDkJ3YCuF8On63+sm8XS3e+zizdzyKO+AStQYfGCQ==;BlobEndpoint=https://demo123b08c.blob.core.windows.net/;FileEndpoint=https://demo123b08c.file.core.windows.net/;QueueEndpoint=https://demo123b08c.queue.core.windows.net/;TableEndpoint=https://demo123b08c.table.core.windows.net/"
See the same output in the below screenshot.

How to get Azure Storage Account Connection String – Video Tutorial
Wrapping Up
In this Azure article, we discussed how to get Azure Storage Account Connection String using Azure Portal, PowerShell, and Azure CLI. Thanks for reading this article !!!