azureblog.co.uk
← cd ~/roles
// roles/azure · internet-of-things

Azure Digital Twins Data OwnerAzure built-in role

Full access role for Digital Twins data-plane

Role IDbcd981a7-7f74-457b-83e1-cceb9e632ffe
CategoryInternet-of-things
Actions0
Data actions7

Before you assign it

  • It reaches the data, not just the resource. It has 7 data actions, such as reading blobs, secrets or messages.

What it can do

No control-plane actions.

Data actions

PermissionWhat it allows
Microsoft.DigitalTwins/digitaltwins/*Every operation under Microsoft.DigitalTwins/digitaltwins
Microsoft.DigitalTwins/digitaltwins/commands/*Every operation under Microsoft.DigitalTwins/digitaltwins/commands
Microsoft.DigitalTwins/digitaltwins/relationships/*Every operation under Microsoft.DigitalTwins/digitaltwins/relationships
Microsoft.DigitalTwins/eventroutes/*Every operation under Microsoft.DigitalTwins/eventroutes
Microsoft.DigitalTwins/jobs/*Every operation under Microsoft.DigitalTwins/jobs
Microsoft.DigitalTwins/models/*Every operation under Microsoft.DigitalTwins/models
Microsoft.DigitalTwins/query/*Every operation under Microsoft.DigitalTwins/query

Assign it

Scope it as tightly as you can: a resource or resource group rather than the whole subscription.

azure cli
az role assignment create \
  --assignee "jane.doe@contoso.com" \
  --role "Azure Digital Twins Data Owner" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Azure Digital Twins Data Owner" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'bcd981a7-7f74-457b-83e1-cceb9e632ffe')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'bcd981a7-7f74-457b-83e1-cceb9e632ffe')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "bcd981a7-7f74-457b-83e1-cceb9e632ffe"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other internet-of-things roles

Find the smallest role for a task →