You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/role-based-access-control/custom-roles.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ manager: karenhoran
7
7
ms.service: role-based-access-control
8
8
ms.topic: conceptual
9
9
ms.workload: identity
10
-
ms.date: 07/28/2022
10
+
ms.date: 08/19/2022
11
11
ms.author: rolyon
12
12
---
13
13
@@ -20,7 +20,7 @@ ms.author: rolyon
20
20
21
21
If the [Azure built-in roles](built-in-roles.md) don't meet the specific needs of your organization, you can create your own custom roles. Just like built-in roles, you can assign custom roles to users, groups, and service principals at management group (in preview only), subscription, and resource group scopes.
22
22
23
-
Custom roles can be shared between subscriptions that trust the same Azure AD directory. There is a limit of **5,000** custom roles per directory. (For Azure Germany and Azure China 21Vianet, the limit is 2,000 custom roles.) Custom roles can be created using the Azure portal, Azure PowerShell, Azure CLI, or the REST API.
23
+
Custom roles can be shared between subscriptions that trust the same Azure AD tenant. There is a limit of **5,000** custom roles per tenant. (For Azure Germany and Azure China 21Vianet, the limit is 2,000 custom roles.) Custom roles can be created using the Azure portal, Azure PowerShell, Azure CLI, or the REST API.
24
24
25
25
## Steps to create a custom role
26
26
@@ -148,15 +148,15 @@ The following table describes what the custom role properties mean.
148
148
149
149
| Property | Required | Type | Description |
150
150
| --- | --- | --- | --- |
151
-
|`Name`</br>`roleName`| Yes | String | The display name of the custom role. While a role definition is a management group or subscription-level resource, a role definition can be used in multiple subscriptions that share the same Azure AD directory. This display name must be unique at the scope of the Azure AD directory. Can include letters, numbers, spaces, and special characters. Maximum number of characters is 512. |
151
+
|`Name`</br>`roleName`| Yes | String | The display name of the custom role. While a role definition is a management group or subscription-level resource, a role definition can be used in multiple subscriptions that share the same Azure AD tenant. This display name must be unique at the scope of the Azure AD tenant. Can include letters, numbers, spaces, and special characters. Maximum number of characters is 512. |
152
152
|`Id`</br>`name`| Yes | String | The unique ID of the custom role. For Azure PowerShell and Azure CLI, this ID is automatically generated when you create a new role. |
153
153
|`IsCustom`</br>`roleType`| Yes | String | Indicates whether this is a custom role. Set to `true` or `CustomRole` for custom roles. Set to `false` or `BuiltInRole` for built-in roles. |
154
154
|`Description`</br>`description`| Yes | String | The description of the custom role. Can include letters, numbers, spaces, and special characters. Maximum number of characters is 2048. |
155
155
|`Actions`</br>`actions`| Yes | String[]| An array of strings that specifies the control plane actions that the role allows to be performed. For more information, see [Actions](role-definitions.md#actions). |
156
156
|`NotActions`</br>`notActions`| No | String[]| An array of strings that specifies the control plane actions that are excluded from the allowed `Actions`. For more information, see [NotActions](role-definitions.md#notactions). |
157
157
|`DataActions`</br>`dataActions`| No | String[]| An array of strings that specifies the data plane actions that the role allows to be performed to your data within that object. If you create a custom role with `DataActions`, that role cannot be assigned at the management group scope. For more information, see [DataActions](role-definitions.md#dataactions). |
158
158
|`NotDataActions`</br>`notDataActions`| No | String[]| An array of strings that specifies the data plane actions that are excluded from the allowed `DataActions`. For more information, see [NotDataActions](role-definitions.md#notdataactions). |
159
-
|`AssignableScopes`</br>`assignableScopes`| Yes | String[]| An array of strings that specifies the scopes that the custom role is available for assignment. Maximum number of `AssignableScopes` is 2,000. You can define only one management group in `AssignableScopes` of a custom role. Adding a management group to `AssignableScopes` is currently in preview. For more information, see [AssignableScopes](role-definitions.md#assignablescopes). |
159
+
|`AssignableScopes`</br>`assignableScopes`| Yes | String[]| An array of strings that specifies the scopes that the custom role is available for assignment. Maximum number of `AssignableScopes` is 2,000. For more information, see [AssignableScopes](role-definitions.md#assignablescopes). |
160
160
161
161
Permission strings are case-insensitive. When you create your custom roles, the convention is to match the case that you see for permissions in [Azure resource provider operations](resource-provider-operations.md).
162
162
@@ -197,23 +197,23 @@ Before you can delete a custom role, you must remove any role assignments that u
197
197
Here are steps to help find the role assignments before deleting a custom role:
198
198
199
199
- List the [custom role definition](role-definitions-list.md).
200
-
- In the [assignable scopes](role-definitions.md#assignablescopes) section, get the management groups, subscriptions, and resource groups.
201
-
- Iterate over the assignable scopes and [list the role assignments](role-assignments-list-portal.md).
200
+
- In the [AssignableScopes](role-definitions.md#assignablescopes) section, get the management groups, subscriptions, and resource groups.
201
+
- Iterate over the `AssignableScopes` and [list the role assignments](role-assignments-list-portal.md).
202
202
-[Remove the role assignments](role-assignments-remove.md) that use the custom role.
203
203
-[Delete the custom role](custom-roles-portal.md#delete-a-custom-role).
204
204
205
205
## Custom role limits
206
206
207
207
The following list describes the limits for custom roles.
208
208
209
-
- Each directory can have up to **5000** custom roles.
210
-
- Azure Germany and Azure China 21Vianet can have up to 2000 custom roles for each directory.
209
+
- Each tenant can have up to **5000** custom roles.
210
+
- Azure Germany and Azure China 21Vianet can have up to 2000 custom roles for each tenant.
211
211
- You cannot set `AssignableScopes` to the root scope (`"/"`).
212
212
- You cannot use wildcards (`*`) in `AssignableScopes`. This wildcard restriction helps ensure a user can't potentially obtain access to a scope by updating the role definition.
213
213
- You can only define one management group in `AssignableScopes` of a custom role. Adding a management group to `AssignableScopes` is currently in preview.
214
214
- You can have only one wildcard in an action string.
215
215
- Custom roles with `DataActions` cannot be assigned at the management group scope.
216
-
- Azure Resource Manager doesn't validate the management group's existence in the role definition's assignable scope.
216
+
- Azure Resource Manager doesn't validate the management group's existence in the role definition's `AssignableScopes`.
217
217
218
218
For more information about custom roles and management groups, see [What are Azure management groups?](../governance/management-groups/overview.md#azure-custom-role-definition-and-assignment).
Copy file name to clipboardExpand all lines: articles/role-based-access-control/role-definitions.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ manager: karenhoran
8
8
ms.service: role-based-access-control
9
9
ms.topic: conceptual
10
10
ms.workload: identity
11
-
ms.date: 01/06/2022
11
+
ms.date: 08/19/2022
12
12
ms.author: rolyon
13
13
ms.custom:
14
14
---
@@ -335,9 +335,13 @@ The following table shows two examples of the effective date plane permissions f
335
335
336
336
## AssignableScopes
337
337
338
-
The `AssignableScopes` property specifies the scopes (management groups, subscriptions, or resource groups) where this role definition can be assigned. You can make the role available for assignment in only the management groups, subscriptions, or resource groups that require it. You must use at least one management group, subscription, or resource group.
338
+
The `AssignableScopes` property specifies the scopes (root, management group, subscriptions, or resource groups) where a role definition can be assigned. You can make a custom role available for assignment in only the management group, subscriptions, or resource groups that require it. You must use at least one management group, subscription, or resource group.
339
339
340
-
Built-in roles have `AssignableScopes` set to the root scope (`"/"`). The root scope indicates that the role is available for assignment in all scopes. Examples of valid assignable scopes include:
340
+
For example, if `AssignableScopes` is set to a subscription, that means that the custom role is available for assignment at subscription scope for the specified subscription, resource group scope for any resource group in the subscription, or resource scope for any resource in the subscription.
341
+
342
+
Built-in roles have `AssignableScopes` set to the root scope (`"/"`). The root scope indicates that the role is available for assignment in all scopes.
343
+
344
+
Examples of valid assignable scopes include:
341
345
342
346
> [!div class="mx-tableFixed"]
343
347
> | Role is available for assignment | Example |
@@ -349,7 +353,11 @@ Built-in roles have `AssignableScopes` set to the root scope (`"/"`). The root s
349
353
> | Management group and a subscription |`"/providers/Microsoft.Management/managementGroups/{groupId1}", "/subscriptions/{subscriptionId1}",`|
350
354
> | All scopes (applies only to built-in roles) |`"/"`|
351
355
352
-
For information about `AssignableScopes` for custom roles, see [Azure custom roles](custom-roles.md).
356
+
You can define only one management group in `AssignableScopes` of a custom role. Adding a management group to `AssignableScopes` is currently in preview.
357
+
358
+
Although it's possible to create a custom role with a resource instance in `AssignableScopes` using the command line, it's not recommended. Each tenant supports a maximum of 5000 custom roles. Using this strategy could potentially exhaust your available custom roles. Ultimately, the level of access is determined by the custom role assignment (scope + role permissions + security principal) and not the `AssignableScopes` listed in the custom role. So, create your custom roles with `AssignableScopes` of management group, subscription, or resource group, but assign the custom roles with narrow scope, such as resource or resource group.
359
+
360
+
For more information about `AssignableScopes` for custom roles, see [Azure custom roles](custom-roles.md).
0 commit comments