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-template.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ manager: amycolannino
7
7
ms.service: role-based-access-control
8
8
ms.topic: how-to
9
9
ms.workload: identity
10
-
ms.date: 12/16/2020
10
+
ms.date: 10/19/2022
11
11
ms.author: rolyon
12
12
ms.custom: devx-track-azurepowershell
13
13
@@ -33,6 +33,12 @@ To create a custom role, you must have:
33
33
34
34
- Permissions to create custom roles, such as [Owner](built-in-roles.md#owner) or [User Access Administrator](built-in-roles.md#user-access-administrator).
35
35
36
+
You must use the following version:
37
+
38
+
-`2018-07-01` or later
39
+
40
+
For more information, see [API versions of Azure RBAC REST APIs](/rest/api/authorization/versions).
41
+
36
42
## Review the template
37
43
38
44
The template used in this article is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/create-role-def). The template has four parameters and a resources section. The four parameters are:
@@ -173,7 +179,7 @@ Here are the changes you would need to make to the previous Quickstart template
[!INCLUDE [Azure role assignment prerequisites](../../includes/role-based-access-control/prerequisites-role-assignments.md)]
28
28
29
+
You must use the following versions:
30
+
31
+
-`2018-09-01-preview` or later to assign an Azure role to a new service principal
32
+
-`2020-04-01-preview` or later to assign an Azure role at resource scope
33
+
-`2022-04-01` is the first stable version
34
+
35
+
For more information, see [API versions of Azure RBAC REST APIs](/rest/api/authorization/versions).
36
+
29
37
## Get object IDs
30
38
31
39
To assign a role, you need to specify the ID of the user, group, or application you want to assign the role to. The ID has the format: `11111111-1111-1111-1111-111111111111`. You can get the ID using the Azure portal, Azure PowerShell, or Azure CLI.
@@ -100,7 +108,7 @@ To use the template, you must do the following:
@@ -310,7 +318,7 @@ The following shows an example of the Contributor role assignment to a user for
310
318
311
319
If you create a new service principal and immediately try to assign a role to that service principal, that role assignment can fail in some cases. For example, if you create a new managed identity and then try to assign a role to that service principal in the same Azure Resource Manager template, the role assignment might fail. The reason for this failure is likely a replication delay. The service principal is created in one region; however, the role assignment might occur in a different region that hasn't replicated the service principal yet.
312
320
313
-
To address this scenario, you should set the `principalType` property to `ServicePrincipal` when creating the role assignment. You must also set the `apiVersion` of the role assignment to `2018-09-01-preview` or later.
321
+
To address this scenario, you should set the `principalType` property to `ServicePrincipal` when creating the role assignment. You must also set the `apiVersion` of the role assignment to `2018-09-01-preview` or later.`2022-04-01` is the first stable version.
314
322
315
323
The following template demonstrates:
316
324
@@ -346,7 +354,7 @@ To use the template, you must specify the following inputs:
0 commit comments