← cd ~/roles
// roles/azure · devops
Lab OperatorAzure built-in role
The lab operator role
| Role ID | a36e6959-b6be-4b12-8e9f-ef4b474d304d |
|---|---|
| Category | Devops |
| Actions | 24 |
| Data actions | 0 |
What it can do
| Permission | What it allows |
|---|---|
Microsoft.Authorization/*/read | Any read operation on anything under Microsoft.Authorization |
Microsoft.Insights/alertRules/* | Every operation under Microsoft.Insights/alertRules |
Microsoft.LabServices/labPlans/images/read | Get the properties of an image. |
Microsoft.LabServices/labPlans/read | Get the properties of a lab plan. |
Microsoft.LabServices/labPlans/saveImage/action | Create an image from a virtual machine in the gallery attached to the lab plan. |
Microsoft.LabServices/labs/publish/action | Publish a lab by propagating image of the template virtual machine to all virtual machines in the lab. |
Microsoft.LabServices/labs/read | Get the properties of a lab. |
Microsoft.LabServices/labs/schedules/read | Get the properties of a schedule. |
Microsoft.LabServices/labs/schedules/write | Create new or update an existing schedule. |
Microsoft.LabServices/labs/schedules/delete | Delete the schedule. |
Microsoft.LabServices/labs/users/read | Get the properties of a user. |
Microsoft.LabServices/labs/users/write | Create new or update an existing user. |
Microsoft.LabServices/labs/users/delete | Delete the user. |
Microsoft.LabServices/labs/users/invite/action | Send email invitation to a user to join the lab. |
Microsoft.LabServices/labs/virtualMachines/read | Get the properties of a virtual machine. |
Microsoft.LabServices/labs/virtualMachines/start/action | Start a virtual machine. |
Microsoft.LabServices/labs/virtualMachines/stop/action | Stop and deallocate a virtual machine. |
Microsoft.LabServices/labs/virtualMachines/reimage/action | Reimage a virtual machine to the last published image. |
Microsoft.LabServices/labs/virtualMachines/redeploy/action | Redeploy a virtual machine to a different compute node. |
Microsoft.LabServices/labs/virtualMachines/resetPassword/action | Reset local user's password on a virtual machine. |
Microsoft.LabServices/locations/usages/read | Get Usage in a location |
Microsoft.LabServices/skus/read | Get the properties of a Lab Services SKU. |
Microsoft.Resources/deployments/* | Every operation under Microsoft.Resources/deployments |
Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
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 "Lab Operator" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Lab Operator" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, 'a36e6959-b6be-4b12-8e9f-ef4b474d304d')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a36e6959-b6be-4b12-8e9f-ef4b474d304d')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "a36e6959-b6be-4b12-8e9f-ef4b474d304d"
| 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