← cd ~/roles
// roles/azure · security
Managed HSM contributorAzure built-in role
Lets you manage managed HSM pools, but not access to them.
| Role ID | 18500a29-7fe2-46b2-a342-b16a415e101d |
|---|---|
| Category | Security |
| Actions | 5 |
| Data actions | 0 |
What it can do
| Permission | What it allows |
|---|---|
Microsoft.KeyVault/managedHSMs/* | Every operation under Microsoft.KeyVault/managedHSMs |
Microsoft.KeyVault/deletedManagedHsms/read | View the properties of a deleted managed hsm |
Microsoft.KeyVault/locations/deletedManagedHsms/read | View the properties of a deleted managed hsm |
Microsoft.KeyVault/locations/deletedManagedHsms/purge/action | Purge a soft deleted managed hsm |
Microsoft.KeyVault/locations/managedHsmOperationResults/read | Check the result of a long run operation |
Assign it
Scope it as tightly as you can: a resource or resource group rather than the whole subscription.
az role assignment create \
--assignee "jane.doe@contoso.com" \
--role "Managed HSM contributor" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Managed HSM contributor" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, '18500a29-7fe2-46b2-a342-b16a415e101d')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18500a29-7fe2-46b2-a342-b16a415e101d')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "18500a29-7fe2-46b2-a342-b16a415e101d"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)Other security roles
- App Compliance Automation Reader · 1 permission
- Key Vault Crypto Service Release User · 1 permission
- Security Assessment Contributor · 1 permission
- Attestation Reader · 2 permissions
- Key Vault Secrets User · 2 permissions
- Attestation Contributor · 3 permissions
- Locks Contributor · 3 permissions
- Key Vault Certificate User · 4 permissions