azureblog.co.uk
← cd ~/roles
// roles/azure · ai-machine-learning

AzureML Data ScientistAzure built-in role

Can perform all actions within an Azure Machine Learning workspace, except for creating or deleting compute resources and modifying the workspace itself.

Role IDf6c7c914-8db3-469d-8ca1-694a8f32e121
CategoryAi-machine-learning
Actions4 (minus 10 NotActions)
Data actions0

What it can do

PermissionWhat it allows
Microsoft.MachineLearningServices/workspaces/*/readAny read operation on anything under Microsoft.MachineLearningServices/workspaces
Microsoft.MachineLearningServices/workspaces/*/actionAny action on anything under Microsoft.MachineLearningServices/workspaces
Microsoft.MachineLearningServices/workspaces/*/deleteAny delete operation on anything under Microsoft.MachineLearningServices/workspaces
Microsoft.MachineLearningServices/workspaces/*/writeAny write operation on anything under Microsoft.MachineLearningServices/workspaces

Can't do

These are taken away from the actions above.

PermissionWhat it allows
Microsoft.MachineLearningServices/workspaces/deleteDeletes the Machine Learning Services Workspace(s)
Microsoft.MachineLearningServices/workspaces/writeCreates or updates a Machine Learning Services Workspace(s)
Microsoft.MachineLearningServices/workspaces/computes/*/writeAny write operation on anything under Microsoft.MachineLearningServices/workspaces/computes
Microsoft.MachineLearningServices/workspaces/computes/*/deleteAny delete operation on anything under Microsoft.MachineLearningServices/workspaces/computes
Microsoft.MachineLearningServices/workspaces/computes/listKeys/actionList secrets for compute resources in Machine Learning Services Workspace
Microsoft.MachineLearningServices/workspaces/listKeys/actionList secrets for a Machine Learning Services Workspace
Microsoft.MachineLearningServices/workspaces/hubs/writeCreates or updates a Machine Learning Services Hub Workspace(s)
Microsoft.MachineLearningServices/workspaces/hubs/deleteDeletes the Machine Learning Services Hub Workspace(s)
Microsoft.MachineLearningServices/workspaces/featurestores/writeCreates or Updates the Machine Learning Services FeatureStore(s)
Microsoft.MachineLearningServices/workspaces/featurestores/deleteDeletes the Machine Learning Services FeatureStore(s)

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 "AzureML Data Scientist" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "AzureML Data Scientist" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'f6c7c914-8db3-469d-8ca1-694a8f32e121')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f6c7c914-8db3-469d-8ca1-694a8f32e121')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "f6c7c914-8db3-469d-8ca1-694a8f32e121"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other ai-machine-learning roles

Find the smallest role for a task →