← cd ~/roles
// roles/azure · identity
Managed Identity OperatorAzure built-in role
Read and Assign User Assigned Identity
| Role ID | f1a07417-d97a-45cb-824c-7a7467783830 |
|---|---|
| Category | Identity |
| Actions | 7 |
| Data actions | 0 |
What it can do
| Permission | What it allows |
|---|---|
Microsoft.ManagedIdentity/userAssignedIdentities/*/read | Any read operation on anything under Microsoft.ManagedIdentity/userAssignedIdentities |
Microsoft.ManagedIdentity/userAssignedIdentities/*/assign/action | Every operation matching Microsoft.ManagedIdentity/userAssignedIdentities/*/assign/action |
Microsoft.Authorization/*/read | Any read operation on anything under Microsoft.Authorization |
Microsoft.Insights/alertRules/* | Every operation under Microsoft.Insights/alertRules |
Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
Microsoft.Resources/deployments/* | Every operation under Microsoft.Resources/deployments |
Microsoft.Support/* | Every operation under Microsoft.Support |
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 Identity Operator" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Managed Identity Operator" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, 'f1a07417-d97a-45cb-824c-7a7467783830')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f1a07417-d97a-45cb-824c-7a7467783830')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "f1a07417-d97a-45cb-824c-7a7467783830"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)Other identity roles
- Managed Identity Contributor · 12 permissions
- Domain Services Reader · 28 permissions
- Domain Services Contributor · 69 permissions