azureblog.co.uk
← cd ~/roles
// roles/azure · devops

DevCenter Dev Box UserAzure built-in role

Provides access to create and manage dev boxes.

Role ID45d50f46-0b78-4001-a660-4198cbe8cd05
CategoryDevops
Actions4
Data actions11

Before you assign it

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

What it can do

PermissionWhat it allows
Microsoft.DevCenter/projects/readLists all projects in the subscription.
Microsoft.DevCenter/projects/*/readAny read operation on anything under Microsoft.DevCenter/projects
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.

Data actions

PermissionWhat it allows
Microsoft.DevCenter/projects/users/devboxes/userStop/actionAllows a user to stop their own Dev Box resources.
Microsoft.DevCenter/projects/users/devboxes/userStart/actionAllows a user to start their own Dev Box resources.
Microsoft.DevCenter/projects/users/devboxes/userGetRemoteConnection/actionAllows a user to get the RDP connection information for their own Dev Box resources.
Microsoft.DevCenter/projects/users/devboxes/userRead/actionAllows a user to read their own Dev Box resources.
Microsoft.DevCenter/projects/users/devboxes/userWrite/actionAllows a user to create and update their own Dev Box resources.
Microsoft.DevCenter/projects/users/devboxes/userDelete/actionAllows a user to delete their own Dev Box resources.
Microsoft.DevCenter/projects/users/devboxes/userUpcomingActionRead/actionAllows a user to read upcoming actions.
Microsoft.DevCenter/projects/users/devboxes/userUpcomingActionManage/actionAllows a user to skip or delay upcoming actions.
Microsoft.DevCenter/projects/users/devboxes/userActionRead/actionAllows a user to read dev box actions.
Microsoft.DevCenter/projects/users/devboxes/userActionManage/actionAllows a user to skip or delay dev box actions.
Microsoft.DevCenter/projects/users/devboxes/userCustomize/actionAllows a user to customize their own Dev Box resources.

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 "DevCenter Dev Box User" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "DevCenter Dev Box User" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '45d50f46-0b78-4001-a660-4198cbe8cd05')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '45d50f46-0b78-4001-a660-4198cbe8cd05')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "45d50f46-0b78-4001-a660-4198cbe8cd05"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other devops roles

Find the smallest role for a task →