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
Get Azure Blob Storage Connection String
This contains the information required to access your Azure Storage account data from your application.
Approach-1: 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, which is under the Security + networking tab.

3. The connection strings are under Key1 and Key2. Click on the Show button next to the Connection string to see its value.

Now copy the connection string and utilize it wherever you need it.
Approach-2: 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.ConnectionStringNote: Please change the values for the storage account and Resource Group names 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

Approach-3: 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 demo123b08cNote: Please change the values for the storage account and Resource Group names 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.

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 !!!

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.
