← 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 ID | 547f7f0a-69c0-4807-bd9e-0321dfb66a84 |
|---|---|
| Category | Internet-of-things |
| Actions | 8 |
| Data actions | 2 |
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
| Permission | What it allows |
|---|---|
Microsoft.DeviceRegistry/namespaces/read | List Namespace resources by subscription ID |
Microsoft.DeviceRegistry/namespaces/write | Create a Namespace |
Microsoft.DeviceRegistry/namespaces/delete | Delete 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/action | Allows device revocation using device based policies. |
Data actions
| Permission | What 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.
az role assignment create \
--assignee "jane.doe@contoso.com" \
--role "Azure Device Registry Onboarding" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Azure Device Registry Onboarding" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"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?
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
- Azure Device Registry Administrator · 1 permission
- Device Provisioning Service Data Contributor · 1 permission
- Device Provisioning Service Data Reader · 1 permission
- IoT Hub Data Contributor · 1 permission
- IoT Hub Registry Contributor · 1 permission
- IoT Hub Twin Contributor · 1 permission
- IoT Hub Data Reader · 2 permissions
- Azure Device Registry Credentials Contributor · 3 permissions