| title | include file |
|---|---|
| description | include file |
| services | storage |
| author | alexwolfmsft |
| ms.service | azure-storage |
| ms.topic | include |
| ms.date | 02/25/2022 |
| ms.author | alexwolf |
| ms.custom | include file |
-
Sign in to the Azure portal.
-
Locate your storage account.
-
In the storage account menu pane, under Security + networking, select Access keys. Here, you can view the account access keys and the complete connection string for each key.
-
In the Access keys pane, select Show keys.
-
In the key1 section, locate the Connection string value. Select the Copy to clipboard icon to copy the connection string. You'll add the connection string value to an environment variable in the next section.
You can see the connection string for your storage account using the az storage account show-connection-string command.
az storage account show-connection-string --name "<your-storage-account-name>"
You can assemble a connection string with PowerShell using the Get-AzStorageAccount and Get-AzStorageAccountKey commands.
$saName = "yourStorageAccountName"
$rgName = "yourResourceGroupName"
$sa = Get-AzStorageAccount -StorageAccountName $saName -ResourceGroupName $rgName
$saKey = (Get-AzStorageAccountKey -ResourceGroupName $rgName -Name $saName)[0].Value
'DefaultEndpointsProtocol=https;AccountName=' + $saName + ';AccountKey=' + $saKey + ';EndpointSuffix=core.windows.net'