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

Azure Device Registry Credentials ContributorAzure built-in role

Allows for full access to manage credentials and policies within Azure Device Registry Namespace.

Role ID09267e11-2e06-40b5-8fe4-68cea20794c9
CategoryInternet-of-things
Actions3
Data actions0

What it can do

PermissionWhat it allows
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.deviceregistry/namespaces/devices/revoke/actionAllows device revocation using device based policies.

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 Credentials Contributor" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Azure Device Registry Credentials Contributor" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '09267e11-2e06-40b5-8fe4-68cea20794c9')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '09267e11-2e06-40b5-8fe4-68cea20794c9')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "09267e11-2e06-40b5-8fe4-68cea20794c9"
| 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 →