We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5b423d commit 1fb0374Copy full SHA for 1fb0374
AccessKeyVaultWithSP.ps1
@@ -0,0 +1,11 @@
1
+$ApplicationId = "" # AppID for the Service Princiapl that has Key Vault Secrets User role
2
+$CertificateThumbprint = "" #
3
+$TenantID = "" # The tenant ID for the Service Princiapl that has Key Vault Secrets User role
4
+
5
+Connect-AzAccount -ApplicationId $ApplicationId -CertificateThumbprint $CertificateThumbprint -Tenant $TenantID
6
7
+$KeyVaultName = "" # The name of your key vault
8
+$KeyVaultSecretName = "" # The name of the secret in the above key vualt
9
10
+$Key = Get-AzKeyVaultSecret -VaultName $KeyVaultName -Name $KeyVaultSecretName
11
+$Key.SecretValueText # Prints the secret value in clear text
0 commit comments