Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Assign List and Get policy to a user in Azure Key Vault if the UPN is not known
$userObjectId = (Get-AzureRmADUser -SearchString 'Joe Bloggs').Id
Set-AzureRmKeyVaultAccessPolicy -VaultName $keyVaultName -ResourceGroupName $resourceGroupName `
-ObjectId $userObjectId `
-PermissionsToCertificates list,get `
-PermissionsToKeys list,get `
-PermissionsToSecrets list,get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment