← cd ~/roles
// roles/azure · internet-of-things
Azure IoT Operations AdministratorAzure built-in role
View, create, edit and delete AIO resources. Manage all resources, including instance and its downstream resources.
| Role ID | 5bc02df6-6cd5-43fe-ad3d-4c93cf56cc16 |
|---|---|
| Category | Internet-of-things |
| Actions | 13 |
| Data actions | 0 |
What it can do
| Permission | What it allows |
|---|---|
Microsoft.IoTOperations/* | Every operation under Microsoft.IoTOperations |
Microsoft.Authorization/*/read | Any read operation on anything under Microsoft.Authorization |
Microsoft.DeviceRegistry/Assets/* | Every operation under Microsoft.DeviceRegistry/Assets |
Microsoft.DeviceRegistry/AssetEndpointProfiles/* | Every operation under Microsoft.DeviceRegistry/AssetEndpointProfiles |
Microsoft.DeviceRegistry/Namespaces/Assets/* | Every operation under Microsoft.DeviceRegistry/Namespaces/Assets |
Microsoft.DeviceRegistry/Namespaces/Devices/* | Every operation under Microsoft.DeviceRegistry/Namespaces/Devices |
Microsoft.DeviceRegistry/Namespaces/DiscoveredAssets/* | Every operation under Microsoft.DeviceRegistry/Namespaces/DiscoveredAssets |
Microsoft.DeviceRegistry/Namespaces/DiscoveredDevices/* | Every operation under Microsoft.DeviceRegistry/Namespaces/DiscoveredDevices |
Microsoft.DeviceRegistry/SchemaRegistries/* | Every operation under Microsoft.DeviceRegistry/SchemaRegistries |
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 Administrator" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Azure IoT Operations Administrator" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, '5bc02df6-6cd5-43fe-ad3d-4c93cf56cc16')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5bc02df6-6cd5-43fe-ad3d-4c93cf56cc16')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "5bc02df6-6cd5-43fe-ad3d-4c93cf56cc16"
| 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