Hi All,
I’m working on enabling Azure Key Vault backup. I need to gather secrets, keys, certificates, and access policies, then save them to a storage account. However, I’ve encountered an issue where the Azure Key Vault cannot retrieve the access policies information, even though I have Key Vault Administrator permissions.
This problem doesn't occur in other key vaults I’ve tested. I would like to know if there is an issue with my PowerShell script or a misconfiguration in the key vault. Please check my test information below.
My Key Vault 1:
My Key Vault 2:
My PowerShell Script for this case:
$keyvaultname = ""
$keyVaultAccessPolicies = Get-AzKeyVault -VaultName $keyvaultname
Write-Output $keyVaultAccessPolicies.AccessPolicies
My test result:
PS C:\Users\azureadmin> $keyVaultAccessPolicies = Get-AzKeyVault -VaultName kv-eas-kvauto-01
PS C:\Users\azureadmin> Write-Output $keyVaultAccessPolicies.AccessPolicies
Tenant ID : xxxxx-xxxxx-xxxxx-xxxxxx-xxxxxxxx
Object ID : xxxxx-xxxxxx-xxxxxxx-xxxxxx-xxxxxxx
Application ID :
Display Name : xxxxxxxxxxxxxx
Permissions to Keys : {Get, List, Update, Create...}
Permissions to Secrets : {Get, List, Set, Delete...}
Permissions to Certificates : {Get, List, Update, Create...}
Permissions to (Key Vault Managed) Storage : {}
PS C:\Users\azureadmin> $keyVaultAccessPolicies = Get-AzKeyVault -VaultName kv-eas-kvauto-02
PS C:\Users\azureadmin> Write-Output $keyVaultAccessPolicies.AccessPolicies