← cd ~/roles
// roles/azure · devops
Lab AssistantAzure built-in role
The lab assistant role
| Role ID | ce40b423-cede-4313-a93f-9b28290b72e1 |
|---|---|
| Category | Devops |
| Actions | 17 |
| 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/labs/read | Get the properties of a lab. |
Microsoft.LabServices/labs/schedules/read | Get the properties of a schedule. |
Microsoft.LabServices/labs/users/read | Get the properties of a 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/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 Assistant" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Lab Assistant" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, 'ce40b423-cede-4313-a93f-9b28290b72e1')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ce40b423-cede-4313-a93f-9b28290b72e1')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "ce40b423-cede-4313-a93f-9b28290b72e1"
| 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