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

Lab CreatorAzure built-in role

Lets you create new labs under your Azure Lab Accounts.

Role IDb97fb8bc-a8b2-4522-a38b-dd33c7e65ead
CategoryDevops
Actions18
Data actions1

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

PermissionWhat it allows
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.LabServices/labAccounts/*/readAny read operation on anything under Microsoft.LabServices/labAccounts
Microsoft.LabServices/labAccounts/createLab/actionCreate a lab in a lab account.
Microsoft.LabServices/labAccounts/getPricingAndAvailability/actionGet the pricing and availability of combinations of sizes, geographies, and operating systems for the lab account.
Microsoft.LabServices/labAccounts/getRestrictionsAndUsage/actionGet core restrictions and usage for this subscription
Microsoft.Insights/alertRules/*Every operation under Microsoft.Insights/alertRules
Microsoft.LabServices/labPlans/images/readGet the properties of an image.
Microsoft.LabServices/labPlans/readGet the properties of a lab plan.
Microsoft.LabServices/labPlans/saveImage/actionCreate an image from a virtual machine in the gallery attached to the lab plan.
Microsoft.LabServices/labs/readGet the properties of a lab.
Microsoft.LabServices/labs/schedules/readGet the properties of a schedule.
Microsoft.LabServices/labs/users/readGet the properties of a user.
Microsoft.LabServices/labs/virtualMachines/readGet the properties of a virtual machine.
Microsoft.LabServices/locations/usages/readGet Usage in a location
Microsoft.LabServices/skus/readGet the properties of a Lab Services SKU.
Microsoft.Resources/deployments/*Every operation under Microsoft.Resources/deployments
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.Support/*Every operation under Microsoft.Support

Data actions

PermissionWhat it allows
Microsoft.LabServices/labPlans/createLab/actionCreate 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.

azure cli
az role assignment create \
  --assignee "jane.doe@contoso.com" \
  --role "Lab Creator" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Lab Creator" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
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?

kql · azure resource graph
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

Find the smallest role for a task →