Skip to content
Azure Lessons
Azure Lessons
  • Home
  • AWS
  • Azure
    • Azure Virtual Machine
    • Azure Active Directory
    • Azure CLI
    • Azure CLI Commands List
    • Azure Cognitive Services
    • Azure Cosmos DB
    • Azure DevOps
    • Azure Functions
    • Azure PowerShell Commands
    • Azure Sentinel
    • Azure SQL
    • Azure Storage
    • Azure Synapse
  • Blogs
  • FREE EBOOK

Az storage account show-connection-string

January 30, 2025 by Rajkishore

Recently, I got the requirement to use the az storage account show-connection-string Azure CLI command. This article will walk you through the syntax and usage of the Az storage account show-connection-string command.

Table of Contents

  • Az storage account show-connection-string
    • Syntax
    • Example-1
    • Example-2

Az storage account show-connection-string

This command helps you to get the connection string for a storage account.

Syntax

az storage account show-connection-string -g YourResourceGroupName -n YourStorageAccountName
az storage account show-connection-string -g YourResourceGroupName -n YourStorageAccountName --subscription YourSubscriptionName

Example-1

The command below will retrieve the connection string details of the specified storage account belonging to the mentioned Resource Group.

az storage account show-connection-string -g MyNewResGrp -n usasaupdated

After executing the above command, I got the expected output, as shown below.

PS /home/bijay> az storage account show-connection-string -g MyNewResGrp -n usasaupdated                                                                                           
{
  "connectionString": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=usasaupdated;AccountKey=6OtW8Av6W0bkLVrYbM0rz1ltKJLP3Z4eAOsQqT/hLFDkSL+EModOC4UFq99hv6Z6+48IqTR2W0Me+AStBbjrjQ==;BlobEndpoint=https://usasaupdated.blob.core.windows.net/;FileEndpoint=https://usasaupdated.file.core.windows.net/;QueueEndpoint=https://usasaupdated.queue.core.windows.net/;TableEndpoint=https://usasaupdated.table.core.windows.net/"
}

You can see the same output as shown in the screenshot shown below.

Az storage account show-connection-string

Example-2

The command below will retrieve the connection string (autogenerated) of the specified storage account belonging to the mentioned Resource Group.

az storage account show-connection-string -g MyNewResGrp -n usasaupdated --subscription "Visual Studio Enterprise"

After executing the above query, I got the expected output, as shown in the screenshot below.

Az storage account show-connection-string command

You may also like following the articles below.

  • az storage account keys list
  • Az storage account keys renew
  • How To List The Storage Accounts In A Subscription On Azure PowerShell
  • How To Check If Azure Storage Account Is Being Used
Microsoft Azure
Rajkishore

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.

How To Import Azure Module In PowerShell
Az keyvault list
Subscribe To Our YouTube Channel Subscribe to AzureLessons YouTube Channel

Recent Posts

  • Azure Login
  • Azure Data Studio Download
  • Azure Data Studio
  • Azure Front Door vs Application Gateway
  • Azure Container Apps
  • About Us
  • Contact Us
  • Privacy Policy
  • Sitemap
© 2026 Azure Lessons