Skip to content

Commit 02e749a

Browse files
Merge pull request #244773 from sdgilley/sdg-feedback
add example role assignment to how-to-assign-roles
2 parents 9eac060 + bc6caea commit 02e749a

File tree

1 file changed

+34
-26
lines changed

1 file changed

+34
-26
lines changed

articles/machine-learning/how-to-assign-roles.md

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ monikerRange: 'azureml-api-1 || azureml-api-2'
1717

1818
# Manage access to an Azure Machine Learning workspace
1919

20-
In this article, you learn how to manage access (authorization) to an Azure Machine Learning workspace. [Azure role-based access control (Azure RBAC)](../role-based-access-control/overview.md) is used to manage access to Azure resources, such as the ability to create new resources or use existing ones. Users in your Azure Active Directory (Azure AD) are assigned specific roles, which grant access to resources. Azure provides both built-in roles and the ability to create custom roles.
20+
In this article, you learn how to manage access (authorization) to an Azure Machine Learning workspace. [Azure role-based access control (Azure RBAC)](/azure/role-based-access-control/overview) is used to manage access to Azure resources, such as the ability to create new resources or use existing ones. Users in your Azure Active Directory (Azure AD) are assigned specific roles, which grant access to resources. Azure provides both built-in roles and the ability to create custom roles.
2121

2222
> [!TIP]
2323
> While this article focuses on Azure Machine Learning, individual services that Azure Machine Learning relies on provide their own RBAC settings. For example, using the information in this article, you can configure who can submit scoring requests to a model deployed as a web service on Azure Kubernetes Service. But Azure Kubernetes Service provides its own set of Azure roles. For service specific RBAC information that may be useful with Azure Machine Learning, see the following links:
2424
>
25-
> * [Control access to Azure Kubernetes cluster resources](../aks/azure-ad-rbac.md)
26-
> * [Use Azure RBAC for Kubernetes authorization](../aks/manage-azure-rbac.md)
27-
> * [Use Azure RBAC for access to blob data](../storage/blobs/assign-azure-role-data-access.md)
25+
> * [Control access to Azure Kubernetes cluster resources](/azure/aks/azure-ad-rbac)
26+
> * [Use Azure RBAC for Kubernetes authorization](/azure/aks/manage-azure-rbac)
27+
> * [Use Azure RBAC for access to blob data](/azure/storage/blobs/assign-azure-role-data-access)
2828
2929
> [!WARNING]
3030
> Applying some roles may limit UI functionality in Azure Machine Learning studio for other users. For example, if a user's role does not have the ability to create a compute instance, the option to create a compute instance will not be available in studio. This behavior is expected, and prevents the user from attempting operations that would return an access denied error.
@@ -50,30 +50,38 @@ In addition, [Azure Machine Learning registries](how-to-manage-registries.md) ha
5050
You can combine the roles to grant different levels of access. For example, you can grant a workspace user both **AzureML Data Scientist** and **AzureML Compute Operator** roles to permit the user to perform experiments while creating computes in a self-service manner.
5151

5252
> [!IMPORTANT]
53-
> Role access can be scoped to multiple levels in Azure. For example, someone with owner access to a workspace may not have owner access to the resource group that contains the workspace. For more information, see [How Azure RBAC works](../role-based-access-control/overview.md#how-azure-rbac-works).
53+
> Role access can be scoped to multiple levels in Azure. For example, someone with owner access to a workspace may not have owner access to the resource group that contains the workspace. For more information, see [How Azure RBAC works](/azure/role-based-access-control/overview#how-azure-rbac-works).
5454
5555

5656
## Manage workspace access
5757

5858
If you're an owner of a workspace, you can add and remove roles for the workspace. You can also assign roles to users. Use the following links to discover how to manage access:
59-
- [Azure portal UI](../role-based-access-control/role-assignments-portal.md)
60-
- [PowerShell](../role-based-access-control/role-assignments-powershell.md)
61-
- [Azure CLI](../role-based-access-control/role-assignments-cli.md)
62-
- [REST API](../role-based-access-control/role-assignments-rest.md)
63-
- [Azure Resource Manager templates](../role-based-access-control/role-assignments-template.md)
59+
60+
- [Azure portal UI](/azure/role-based-access-control/role-assignments-portal)
61+
- [PowerShell](/azure/role-based-access-control/role-assignments-powershell)
62+
- [Azure CLI](/azure/role-based-access-control/role-assignments-cli)
63+
- [REST API](/azure/role-based-access-control/role-assignments-rest)
64+
- [Azure Resource Manager templates](/azure/role-based-access-control/role-assignments-template)
65+
66+
For example, use [Azure CLI](/azure/role-based-access-control/role-assignments-cli) to assign contributor role to [email protected] for resource group "this-rg" with the following command:
67+
68+
```azurecli
69+
az role assignment create --role "Contributor" --assignee "[email protected]" --resource-group this-rg
70+
```
71+
6472

6573
## Use Azure AD security groups to manage workspace access
6674

6775
You can use Azure AD security groups to manage access to workspaces. This approach has following benefits:
6876
* Team or project leaders can manage user access to workspace as security group owners, without needing Owner role on the workspace resource directly.
6977
* You can organize, manage and revoke users' permissions on workspace and other resources as a group, without having to manage permissions on user-by-user basis.
70-
* Using Azure AD groups helps you to avoid reaching the [subscription limit](../role-based-access-control/troubleshoot-limits.md) on role assignments.
78+
* Using Azure AD groups helps you to avoid reaching the [subscription limit](/azure/role-based-access-control/troubleshoot-limits) on role assignments.
7179

7280
To use Azure AD security groups:
73-
1. [Create a security group](../active-directory/fundamentals/active-directory-groups-view-azure-portal.md).
74-
2. [Add a group owner](../active-directory/fundamentals/how-to-manage-groups.md#add-or-remove-members-and-owners). This user has permissions to add or remove group members. Note that the group owner isn't required to be group member, or have direct RBAC role on the workspace.
81+
1. [Create a security group](/azure/active-directory/fundamentals/active-directory-groups-view-azure-portal).
82+
2. [Add a group owner](/azure/active-directory/fundamentals/how-to-manage-groups#add-or-remove-members-and-owners). This user has permissions to add or remove group members. Note that the group owner isn't required to be group member, or have direct RBAC role on the workspace.
7583
3. Assign the group an RBAC role on the workspace, such as AzureML Data Scientist, Reader or Contributor.
76-
4. [Add group members](../active-directory/fundamentals/how-to-manage-groups.md#add-or-remove-members-and-owners). The members consequently gain access to the workspace.
84+
4. [Add group members](/azure/active-directory/fundamentals/how-to-manage-groups#add-or-remove-members-and-owners). The members consequently gain access to the workspace.
7785

7886
## Create custom role
7987

@@ -118,41 +126,41 @@ This custom role can do everything in the workspace except for the following act
118126

119127
To deploy this custom role, use the following Azure CLI command:
120128

121-
```azurecli-interactive
129+
```azurecli
122130
az role definition create --role-definition data_scientist_role.json
123131
```
124132

125133
After deployment, this role becomes available in the specified workspace. Now you can add and assign this role in the Azure portal.
126134

127-
For more information on custom roles, see [Azure custom roles](../role-based-access-control/custom-roles.md).
135+
For more information on custom roles, see [Azure custom roles](/azure/role-based-access-control/custom-roles).
128136

129137
### Azure Machine Learning operations
130138

131-
For more information on the operations (actions and not actions) usable with custom roles, see [Resource provider operations](../role-based-access-control/resource-provider-operations.md#microsoftmachinelearningservices). You can also use the following Azure CLI command to list operations:
139+
For more information on the operations (actions and not actions) usable with custom roles, see [Resource provider operations](/azure/role-based-access-control/resource-provider-operations#microsoftmachinelearningservices). You can also use the following Azure CLI command to list operations:
132140

133-
```azurecli-interactive
141+
```azurecli
134142
az provider operation show –n Microsoft.MachineLearningServices
135143
```
136144

137145
## List custom roles
138146

139147
In the Azure CLI, run the following command:
140148

141-
```azurecli-interactive
149+
```azurecli
142150
az role definition list --subscription <sub-id> --custom-role-only true
143151
```
144152

145153
To view the role definition for a specific custom role, use the following Azure CLI command. The `<role-name>` should be in the same format returned by the command above:
146154

147-
```azurecli-interactive
155+
```azurecli
148156
az role definition list -n <role-name> --subscription <sub-id>
149157
```
150158

151159
## Update a custom role
152160

153161
In the Azure CLI, run the following command:
154162

155-
```azurecli-interactive
163+
```azurecli
156164
az role definition update --role-definition update_def.json --subscription <sub-id>
157165
```
158166

@@ -192,7 +200,7 @@ The following table is a summary of Azure Machine Learning activities and the pe
192200

193201
1: If you receive a failure when trying to create a workspace for the first time, make sure that your role allows `Microsoft.MachineLearningServices/register/action`. This action allows you to register the Azure Machine Learning resource provider with your Azure subscription.
194202

195-
2: When attaching an AKS cluster, you also need to have the [Azure Kubernetes Service Cluster Admin Role](../role-based-access-control/built-in-roles.md#azure-kubernetes-service-cluster-admin-role) on the cluster.
203+
2: When attaching an AKS cluster, you also need to have the [Azure Kubernetes Service Cluster Admin Role](/azure/role-based-access-control/built-in-roles#azure-kubernetes-service-cluster-admin-role) on the cluster.
196204

197205
### Differences between actions for V1 and V2 APIs
198206

@@ -212,11 +220,11 @@ You can make custom roles compatible with both V1 and V2 APIs by including both
212220

213221
When using a customer-managed key (CMK), an Azure Key Vault is used to store the key. The user or service principal used to create the workspace must have owner or contributor access to the key vault.
214222

215-
Within the key vault, the user or service principal must have create, get, delete, and purge access to the key through a key vault access policy. For more information, see [Azure Key Vault security](../key-vault/general/security-features.md#controlling-access-to-key-vault-data).
223+
Within the key vault, the user or service principal must have create, get, delete, and purge access to the key through a key vault access policy. For more information, see [Azure Key Vault security](/azure/key-vault/general/security-features#controlling-access-to-key-vault-data).
216224

217225
### User-assigned managed identity with Azure Machine Learning compute cluster
218226

219-
To assign a user assigned identity to an Azure Machine Learning compute cluster, you need write permissions to create the compute and the [Managed Identity Operator Role](../role-based-access-control/built-in-roles.md#managed-identity-operator). For more information on Azure RBAC with Managed Identities, read [How to manage user assigned identity](../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal.md)
227+
To assign a user assigned identity to an Azure Machine Learning compute cluster, you need write permissions to create the compute and the [Managed Identity Operator Role](/azure/role-based-access-control/built-in-roles#managed-identity-operator). For more information on Azure RBAC with Managed Identities, read [How to manage user assigned identity](/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal)
220228

221229
### MLflow operations
222230

@@ -596,7 +604,7 @@ Here are a few things to be aware of while you use Azure role-based access contr
596604

597605
- To perform quota operations in a workspace, you need subscription level permissions. This means setting either subscription level quota or workspace level quota for your managed compute resources can only happen if you have write permissions at the subscription scope.
598606

599-
- When there are two role assignments to the same Azure Active Directory user with conflicting sections of Actions/NotActions, your operations listed in NotActions from one role might not take effect if they are also listed as Actions in another role. To learn more about how Azure parses role assignments, read [How Azure RBAC determines if a user has access to a resource](../role-based-access-control/overview.md#how-azure-rbac-determines-if-a-user-has-access-to-a-resource)
607+
- When there are two role assignments to the same Azure Active Directory user with conflicting sections of Actions/NotActions, your operations listed in NotActions from one role might not take effect if they are also listed as Actions in another role. To learn more about how Azure parses role assignments, read [How Azure RBAC determines if a user has access to a resource](/azure/role-based-access-control/overview#how-azure-rbac-determines-if-a-user-has-access-to-a-resource)
600608

601609
[!INCLUDE [network-rbac](includes/network-rbac.md)]
602610

@@ -607,4 +615,4 @@ Here are a few things to be aware of while you use Azure role-based access contr
607615
- [Enterprise security overview](concept-enterprise-security.md)
608616
- [Virtual network isolation and privacy overview](how-to-network-security-overview.md)
609617
- [Tutorial: Train and deploy a model](tutorial-train-deploy-notebook.md)
610-
- [Resource provider operations](../role-based-access-control/resource-provider-operations.md#microsoftmachinelearningservices)
618+
- [Resource provider operations](/azure/role-based-access-control/resource-provider-operations#microsoftmachinelearningservices)

0 commit comments

Comments
 (0)