This document provides step-by-step instructions on how to retrieve access keys to use Azure Blob storage as a connection.
Using Azure Portal
Sign in to the Azure Portal (https://portal.azure.com).
-
Navigate to 'Storage accounts' and select your storage account.
-
Under the 'Overview' tab, you will find:
- Storage Account Name
- Primary Endpoint URL (for Blob, Data Lake, etc.) -
To retrieve the container name:
- Click on 'Containers' in the left-hand menu.
- The list of containers will be displayed; select the desired container to view its name. -
In the left-hand menu, click on 'Access keys'.
- You will see two access keys (key1 and key2) and connection strings. You can copy either key to use for authentication.
Using Azure CLI
Run the following command to retrieve the access keys:
1. Open your terminal or command prompt.
2. List all storage accounts:
az storage account list --query "[].{Name:name, ResourceGroup:resourceGroup}" --output table
3. Retrieve the endpoint URL for a specific storage account:
az storage account show --name <storage_account_name> --query "primaryEndpoints"
4. List containers in a storage account:
az storage container list --account-name <storage_account_name> --query "[].name" --output table
5. List keys for storage container in storage account:
az storage account keys list --resource-group <your-resource-group> --account-name <your-storage-account>
This will return a JSON object containing key1 and key2.