I'm using my personal Azure account and Visual Studio Azure subscription where I'm Global Admin. I get the following error when I try to purge a soft-deleted Azure Key Vault.
Using Azure Power Shell:
Remove-AzKeyVault: Operation 'DeletedVaultPurge' is not allowed.
Using Azure CLI:
ValidationError: (MethodNotAllowed) Operation 'DeletedVaultPurge' is not allowed.
It looks like there is a permission that I don't have, even though I'm Global Admin. So what do I need to do in order to purge soft-deleted Key Vaults?
Here are the steps in Azure Power Shell (4.7.0) that I can use to reproduce the error:
First I create a Key Vault:
New-AzKeyVault -Name $keyVaultName -ResourceGroupName $resourceGroupName -Location $location -EnablePurgeProtection
Then I delete it.
Remove-AzKeyVault -Name $keyVaultName -ResourceGroupName $resourceGroupName
Then try to purge the soft-deleted Key Vault:
Remove-AzKeyVault -Name $keyVaultName -Location $location -InRemovedState -Force
Remove-AzKeyVault: Operation 'DeletedVaultPurge' is not allowed.