Skip to content

Corrected error in docs for Set-AzureRmKeyVaultAccessPolicy #4313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Note that although specifying the resource group is optional for this cmdlet, yo
### Example 1: Grant permissions to a user for a key vault Key Vault and modify the permissionskey vault
```
PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected]' -PermissionsToKeys create,import,delete,list -PermissionsToSecrets 'set,delete'
PS C:\> Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected]' -PermissionsToSecrets 'set,delete,get' -PassThru
PS C:\> Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected]' -PermissionsToSecrets set,delete,get -PassThru
PS C:\> Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected]' -PermissionsToKeys @() -PassThru
```

Expand All @@ -92,7 +92,7 @@ The *PassThru* parameter results in the updated object being returned by the cmd

### Example 2: Grant permissions for an application service principal to read and write secrets
```
PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ServicePrincipalName 'http://payroll.contoso.com' -PermissionsToSecrets 'Get,Set'
PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ServicePrincipalName 'http://payroll.contoso.com' -PermissionsToSecrets Get,Set
```

This command grants permissions for an application for a key vault named Contoso03Vault.
Expand All @@ -103,15 +103,15 @@ This example specifies the service principal name http://payroll.contoso.com, an

### Example 3: Grant permissions for an application using its object ID
```
PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ObjectId 34595082-9346-41b6-8d6b-295a2808b8db -PermissionsToSecrets 'Get,Set'
PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ObjectId 34595082-9346-41b6-8d6b-295a2808b8db -PermissionsToSecrets Get,Set
```

This command grants the application permissions to read and write secrets.
This example specifies the application using the object ID of the service principal of the application.

### Example 4: Grant permissions for a user principal name
```
PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected]' -PermissionsToSecrets 'Get,List,Set'
PS C:\>Set-AzureRmKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName '[email protected]' -PermissionsToSecrets Get,List,Set
```

This command grants get, list, and set permissions for the specified user principal name for access to secrets.
Expand Down