Skip to main content
Azure SDK secrets store Azure service principal credentials, enabling your workloads to authenticate with Azure services using the Azure SDK. Use them for accessing Azure Storage, Key Vault, Cosmos DB, or any Azure resource.

Use Cases

  • Azure Storage: Access Blob Storage, Files, Queues, or Tables
  • Azure Key Vault: Retrieve secrets, keys, and certificates
  • Azure Cosmos DB: Connect to Cosmos DB databases
  • Azure Service Bus: Send and receive messages
  • Any Azure Service: Authenticate with Azure Resource Manager APIs

Configuration Options

FieldDescriptionRequired
subscriptionIdAzure subscription ID (GUID)Yes
tenantIdAzure AD tenant ID (GUID)Yes
clientIdService principal application ID (GUID)Yes
clientSecretService principal client secretYes
Create a service principal using the Azure CLI: az ad sp create-for-rbac --name "my-app" --role contributor --scopes /subscriptions/{subscription-id}

Create an Azure SDK Secret

1

Navigate to Secrets

In the Console, navigate to Secrets and click New, or use the Create dropdown in the top-right corner and select Secret.
2

Enter basic information

Enter a Name and optional Description.
3

Select secret type

Select Azure-SDK as the secret type.
4

Configure credentials

Click Data in the left pane. Enter the Azure SDK Secret Data (JSON format), or drag and drop a file / click to import.
5

Create the secret

Click Create.

Creating a Service Principal

Use the Azure CLI to create a service principal:
# Create service principal with Contributor role
az ad sp create-for-rbac \
  --name "my-control-plane-app" \
  --role contributor \
  --scopes /subscriptions/{subscription-id}

# Output includes:
# {
#   "appId": "00000000-0000-0000-0000-000000000000",      <- clientId
#   "displayName": "my-control-plane-app",
#   "password": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",   <- clientSecret
#   "tenant": "00000000-0000-0000-0000-000000000000"      <- tenantId
# }
Use the principle of least privilege. Assign only the roles your workload needs, scoped to specific resources when possible.

Next Steps