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 synapse Analytics Tutorial
  • Azure VM Backup Pricing
  • Azure VM
  • What Is Edge Location In AWS
  • DP-300 Certification
  • About Us
  • Contact Us
  • Privacy Policy
  • Sitemap
© 2026 Azure Lessons
Azure
Virtual
Machine
By: Rajkishore
Azure Consultant
PDF

Free 25+ page PDF

Download free Azure Virtual Machine PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!

No spam, ever. You will also get new Azure tutorials by email. Unsubscribe any time. Privacy policy

Check your inbox

Your Azure Virtual Machine PDF is on its way to . Can't find it in a few minutes? Look in your Promotions or Spam folder.