Created
November 29, 2018 01:04
-
-
Save gregjhogan/2491ced2aeded49e0d007bc04db2eb0a to your computer and use it in GitHub Desktop.
azure sdk python key vault get secret using client from cli credentials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from azure.common.credentials import get_azure_cli_credentials | |
| credentials, subscription_id = get_azure_cli_credentials(resource="https://vault.azure.net") | |
| kv_client = KeyVaultClient(credentials=credentials) | |
| kv_secret = kv_client.get_secret("https://<vault-name>.vault.azure.net/", "<secret-name>", "") | |
| print(kv_secret.value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment