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

Azure Device Registry OnboardingAzure built-in role

Allows for full access to Azure Device Registry Namespace and X.509 certificate provisioning.

Role ID547f7f0a-69c0-4807-bd9e-0321dfb66a84
CategoryInternet-of-things
Actions8
Data actions2

Before you assign it

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

What it can do

PermissionWhat it allows
Microsoft.DeviceRegistry/namespaces/readList Namespace resources by subscription ID
Microsoft.DeviceRegistry/namespaces/writeCreate a Namespace
Microsoft.DeviceRegistry/namespaces/deleteDelete a Namespace
Microsoft.DeviceRegistry/namespaces/credentials/*Every operation under Microsoft.DeviceRegistry/namespaces/credentials
Microsoft.DeviceRegistry/namespaces/credentials/policies/*Every operation under Microsoft.DeviceRegistry/namespaces/credentials/policies
Microsoft.Devices/iothubs/*Every operation under Microsoft.Devices/iothubs
Microsoft.Devices/provisioningServices/*Every operation under Microsoft.Devices/provisioningServices
microsoft.deviceregistry/namespaces/devices/revoke/actionAllows device revocation using device based policies.

Data actions

PermissionWhat it allows
Microsoft.Devices/provisioningServices/enrollments/*Every operation under Microsoft.Devices/provisioningServices/enrollments
Microsoft.Devices/provisioningServices/enrollmentGroups/*Every operation under Microsoft.Devices/provisioningServices/enrollmentGroups

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 Device Registry Onboarding" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Azure Device Registry Onboarding" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '547f7f0a-69c0-4807-bd9e-0321dfb66a84')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '547f7f0a-69c0-4807-bd9e-0321dfb66a84')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "547f7f0a-69c0-4807-bd9e-0321dfb66a84"
| 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 →