← cd ~/roles
// roles/azure · devops
Lab CreatorAzure built-in role
Lets you create new labs under your Azure Lab Accounts.
| Role ID | b97fb8bc-a8b2-4522-a38b-dd33c7e65ead |
|---|---|
| Category | Devops |
| Actions | 18 |
| Data actions | 1 |
Before you assign it
- It reaches the data, not just the resource. It has 1 data action, such as reading blobs, secrets or messages.
What it can do
| Permission | What it allows |
|---|---|
Microsoft.Authorization/*/read | Any read operation on anything under Microsoft.Authorization |
Microsoft.LabServices/labAccounts/*/read | Any read operation on anything under Microsoft.LabServices/labAccounts |
Microsoft.LabServices/labAccounts/createLab/action | Create a lab in a lab account. |
Microsoft.LabServices/labAccounts/getPricingAndAvailability/action | Get the pricing and availability of combinations of sizes, geographies, and operating systems for the lab account. |
Microsoft.LabServices/labAccounts/getRestrictionsAndUsage/action | Get core restrictions and usage for this subscription |
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/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/virtualMachines/read | Get the properties of 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. |
Microsoft.Support/* | Every operation under Microsoft.Support |
Data actions
| Permission | What it allows |
|---|---|
Microsoft.LabServices/labPlans/createLab/action | Create a new lab from a lab plan. |
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 Creator" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Lab Creator" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, 'b97fb8bc-a8b2-4522-a38b-dd33c7e65ead')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b97fb8bc-a8b2-4522-a38b-dd33c7e65ead')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "b97fb8bc-a8b2-4522-a38b-dd33c7e65ead"
| 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