← cd ~/roles
// roles/azure · devops
DevTest Labs UserAzure built-in role
Lets you connect, start, restart, and shutdown your virtual machines in your Azure DevTest Labs.
| Role ID | 76283e04-6283-4c54-8f91-bcf1374a3c64 |
|---|---|
| Category | Devops |
| Actions | 32 (minus 1 NotActions) |
| Data actions | 0 |
What it can do
| Permission | What it allows |
|---|---|
Microsoft.Authorization/*/read | Any read operation on anything under Microsoft.Authorization |
Microsoft.Compute/availabilitySets/read | Get the properties of an availability set |
Microsoft.Compute/virtualMachines/*/read | Any read operation on anything under Microsoft.Compute/virtualMachines |
Microsoft.Compute/virtualMachines/deallocate/action | Powers off the virtual machine and releases the compute resources |
Microsoft.Compute/virtualMachines/read | Get the properties of a virtual machine |
Microsoft.Compute/virtualMachines/restart/action | Restarts the virtual machine |
Microsoft.Compute/virtualMachines/start/action | Starts the virtual machine |
Microsoft.DevTestLab/*/read | Any read operation on anything under Microsoft.DevTestLab |
Microsoft.DevTestLab/labs/claimAnyVm/action | Claim a random claimable virtual machine in the lab. |
Microsoft.DevTestLab/labs/createEnvironment/action | Create virtual machines in a lab. |
Microsoft.DevTestLab/labs/ensureCurrentUserProfile/action | Ensure the current user has a valid profile in the lab. |
Microsoft.DevTestLab/labs/formulas/delete | Delete formulas. |
Microsoft.DevTestLab/labs/formulas/read | Read formulas. |
Microsoft.DevTestLab/labs/formulas/write | Add or modify formulas. |
Microsoft.DevTestLab/labs/policySets/evaluatePolicies/action | Evaluates lab policy. |
Microsoft.DevTestLab/labs/virtualMachines/claim/action | Take ownership of an existing virtual machine |
Microsoft.DevTestLab/labs/virtualmachines/listApplicableSchedules/action | Lists the applicable start/stop schedules, if any. |
Microsoft.DevTestLab/labs/virtualMachines/getRdpFileContents/action | Gets a string that represents the contents of the RDP file for the virtual machine |
Microsoft.Network/loadBalancers/backendAddressPools/join/action | Joins a load balancer backend address pool. Not Alertable. |
Microsoft.Network/loadBalancers/inboundNatRules/join/action | Joins a load balancer inbound nat rule. Not Alertable. |
Microsoft.Network/networkInterfaces/*/read | Any read operation on anything under Microsoft.Network/networkInterfaces |
Microsoft.Network/networkInterfaces/join/action | Joins a Virtual Machine to a network interface. Not Alertable. |
Microsoft.Network/networkInterfaces/read | Gets a network interface definition. |
Microsoft.Network/networkInterfaces/write | Creates a network interface or updates an existing network interface. |
Microsoft.Network/publicIPAddresses/*/read | Any read operation on anything under Microsoft.Network/publicIPAddresses |
Microsoft.Network/publicIPAddresses/join/action | Joins a public IP address. Not Alertable. |
Microsoft.Network/publicIPAddresses/read | Gets a public IP address definition. |
Microsoft.Network/virtualNetworks/subnets/join/action | Joins a virtual network. Not Alertable. |
Microsoft.Resources/deployments/operations/read | Gets or lists deployment operations. |
Microsoft.Resources/deployments/read | Gets or lists deployments. |
Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
Microsoft.Storage/storageAccounts/listKeys/action | Returns the access keys for the specified storage account. |
Can't do
These are taken away from the actions above.
| Permission | What it allows |
|---|---|
Microsoft.Compute/virtualMachines/vmSizes/read | Lists available sizes the virtual machine can be updated to |
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 "DevTest Labs User" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "DevTest Labs User" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, '76283e04-6283-4c54-8f91-bcf1374a3c64')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '76283e04-6283-4c54-8f91-bcf1374a3c64')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "76283e04-6283-4c54-8f91-bcf1374a3c64"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)Other devops roles
- Lab Services Reader · 4 permissions
- Playwright Workspace Reader · 4 permissions
- Chaos Studio Experiment Contributor · 5 permissions
- Playwright Workspace Owner · 5 permissions
- Chaos Studio Reader · 6 permissions
- DevCenter Owner · 6 permissions
- Lab Services Contributor · 6 permissions
- Load Test Owner · 6 permissions