Skip to content

Instantly share code, notes, and snippets.

@haray-isao
Created June 20, 2018 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haray-isao/6bb1f0f3bf554d537fdaf07f00e7d44a to your computer and use it in GitHub Desktop.
Save haray-isao/6bb1f0f3bf554d537fdaf07f00e7d44a to your computer and use it in GitHub Desktop.
# Add a secret to key vault
az keyvault secret set --vault-name <myKeyVault> \
--name <mySecretName> \
--value <mySecret>
# View the value
az keyvault secret show --vault-name <myKeyVault> --name <mySecretName>
# Authorize user to use the key or secret
az keyvault set-policy --name <myKeyVault> \
--upn <username@domain> \
--secret-permissions get
# Authorize the application to use the key or secret
az keyvault set-policy --name <myKeyVault> \
--spn <ServicePrincipal> \
--secret-permissions get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment