Read a Key Vault secret value

Get the raw secret without quotes using --query and -o tsv, ready to put into an env variable.

az keyvault secret show --vault-name <name> --name <name> --query value -o tsv

tool
az4 commands
tags
azsecretscloud

More az commands

  • az vm list -d -o table --query "[].{name:name,ip:publicIps,state:powerState}"

    -d adds live details like the public IP and power state; without it, these fields are missing.

  • az login --service-principal -u <id> -p "$AZ_SECRET" --tenant <id>

    Non-interactive login for CI; with OIDC, use --federated-token instead of a secret.

  • az aks get-credentials -g <name> -n <cluster> --overwrite-existing

    Merge the AKS context into kubeconfig; adding --admin skips Azure AD RBAC if it is enabled.

all 4 az commands