← cd ~/roles
// roles/azure · internet-of-things
Azure IoT Operations OnboardingAzure built-in role
User can Azure arc connect and deploy Azure IoT Operations securely.
| Role ID | 7b7c71ed-33fa-4ed2-a91a-e56d5da260b5 |
|---|---|
| Category | Internet-of-things |
| Actions | 10 |
| Data actions | 0 |
Before you assign it
- It can give access to others. It allows
Microsoft.Authorization/roleAssignments/write, so treat it as a privileged role and assign it through PIM where you can.
What it can do
| Permission | What it allows |
|---|---|
Microsoft.IoTOperations/* | Every operation under Microsoft.IoTOperations |
Microsoft.DeviceRegistry/register/action | Register the subscription for Microsoft.DeviceRegistry |
Microsoft.DeviceRegistry/schemaRegistries/read | List SchemaRegistry resources by subscription ID |
Microsoft.DeviceRegistry/schemaRegistries/write | Create a SchemaRegistry |
Microsoft.Authorization/*/read | Any read operation on anything under Microsoft.Authorization |
Microsoft.Authorization/roleAssignments/write | Create a role assignment at the specified scope. |
Microsoft.Insights/alertRules/* | Every operation under Microsoft.Insights/alertRules |
Microsoft.Resources/deployments/* | Every operation under Microsoft.Resources/deployments |
Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
Microsoft.Edge/sites/read | Get a Site |
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 IoT Operations Onboarding" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Azure IoT Operations Onboarding" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, '7b7c71ed-33fa-4ed2-a91a-e56d5da260b5')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7b7c71ed-33fa-4ed2-a91a-e56d5da260b5')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "7b7c71ed-33fa-4ed2-a91a-e56d5da260b5"
| 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