Skip to main content

Assign Get (Read) Key Vault permissions to a System Managed Identity using PowerShell Set-AzKeyVaultAccessPolicy


Grant Key Vault Permissions to System Managed Identity

Assign Get (Read) Key Vault permissions to the System Managed Identity using PowerShell Set-AzKeyVaultAccessPolicy

$RGName = "test-rg"
$AAccountName = "test-aa"
$Location = "UK West"
$KVName = "test-829-kv"
 
$SystemMI = (Get-AzAutomationAccount -ResourceGroupName $RGName -Name $AAccountName).Identity.PrincipalId
 
Set-AzKeyVaultAccessPolicy -VaultName $KVName -ObjectId $SystemMI -PermissionsToSecrets Get

 grant key vault permissions

Vault Access Policies

System Managed Identity has Get permissions

vault access policies

 

 


Filter articles by tag