Last active
April 17, 2017 05:59
-
-
Save PlagueHO/5900d92a9b97e947bc60ff7fe721fefe to your computer and use it in GitHub Desktop.
Assign List and Get policy to a user in Azure Key Vault if the UPN is not known
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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