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/role-assignments-list-rest.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.workload: multiple
13
13
ms.tgt_pltfrm: rest-api
14
14
ms.devlang: na
15
15
ms.topic: conceptual
16
-
ms.date: 03/19/2020
16
+
ms.date: 05/06/2020
17
17
ms.author: rolyon
18
18
ms.reviewer: bagovind
19
19
@@ -57,6 +57,35 @@ In Azure RBAC, to list access, you list the role assignments. To list role assig
57
57
> | `$filter=atScope()+and+assignedTo('{objectId}')` | Lists role assignments for the specified user or service principal and at the specified scope. |
58
58
> | `$filter=principalId+eq+'{objectId}'` | Lists role assignments for a specified user, group, or service principal. |
59
59
60
+
The following request lists all role assignments for the specified user at subscription scope:
61
+
62
+
```http
63
+
GET https://management.azure.com/subscriptions/{subscriptionId1}/providers/Microsoft.Authorization/roleAssignments?api-version=2015-07-01&$filter=atScope()+and+assignedTo('{objectId1}')
Copy file name to clipboardExpand all lines: articles/role-based-access-control/role-assignments-rest.md
+64-5Lines changed: 64 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.workload: multiple
13
13
ms.tgt_pltfrm: rest-api
14
14
ms.devlang: na
15
15
ms.topic: conceptual
16
-
ms.date: 03/19/2020
16
+
ms.date: 05/06/2020
17
17
ms.author: rolyon
18
18
ms.reviewer: bagovind
19
19
@@ -39,7 +39,7 @@ In Azure RBAC, to grant access, you add a role assignment. To add a role assignm
39
39
1. Start with the following request and body:
40
40
41
41
```http
42
-
PUT https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}?api-version=2015-07-01
42
+
PUT https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentId}?api-version=2015-07-01
43
43
```
44
44
45
45
```json
@@ -63,7 +63,7 @@ In Azure RBAC, to grant access, you add a role assignment. To add a role assignm
63
63
64
64
In the previous example, microsoft.web is a resource provider that refers to an App Service instance. Similarly, you can use any other resource providers and specify the scope. For more information, see [Azure Resource providers and types](../azure-resource-manager/management/resource-providers-and-types.md) and supported [Azure Resource Manager resource provider operations](resource-provider-operations.md).
65
65
66
-
1. Replace *{roleAssignmentName}* with the GUID identifier of the role assignment.
66
+
1. Replace *{roleAssignmentId}* with the GUID identifier of the role assignment.
67
67
68
68
1. Within the request body, replace *{scope}* with the scope for the role assignment.
69
69
@@ -79,6 +79,40 @@ In Azure RBAC, to grant access, you add a role assignment. To add a role assignm
79
79
80
80
1. Replace *{principalId}* with the object identifier of the user, group, or service principal that will be assigned the role.
81
81
82
+
The following request and body assigns the [Backup Reader](built-in-roles.md#backup-reader) role to a user at subscription scope:
83
+
84
+
```http
85
+
PUT https://management.azure.com/subscriptions/{subscriptionId1}/providers/microsoft.authorization/roleassignments/{roleAssignmentId1}?api-version=2015-07-01
In Azure RBAC, to remove access, you remove a role assignment. To remove a role assignment, use the [Role Assignments - Delete](/rest/api/authorization/roleassignments/delete) REST API. To call this API, you must have access to the `Microsoft.Authorization/roleAssignments/delete` operation. Of the built-in roles, only [Owner](built-in-roles.md#owner) and [User Access Administrator](built-in-roles.md#user-access-administrator) are granted access to this operation.
@@ -88,7 +122,7 @@ In Azure RBAC, to remove access, you remove a role assignment. To remove a role
Copy file name to clipboardExpand all lines: articles/role-based-access-control/role-definitions-list.md
+86-1Lines changed: 86 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.devlang: na
12
12
ms.topic: conceptual
13
13
ms.tgt_pltfrm: na
14
14
ms.workload: identity
15
-
ms.date: 03/19/2020
15
+
ms.date: 05/06/2020
16
16
ms.author: rolyon
17
17
ms.reviewer: bagovind
18
18
---
@@ -340,6 +340,55 @@ To list role definitions, use the [Role Definitions - List](/rest/api/authorizat
340
340
> | `$filter=atScopeAndBelow()` | Lists role definitions for the specified scope and any subscopes. |
341
341
> | `$filter=type+eq+'{type}'` | Lists role definitions of the specified type. Type of role can be `CustomRole` or `BuiltInRole`. |
342
342
343
+
The following request lists custom role definitions at subscription scope:
344
+
345
+
```http
346
+
GET https://management.azure.com/subscriptions/{subscriptionId1}/providers/Microsoft.Authorization/roleDefinitions?api-version=2015-07-01&$filter=type+eq+'CustomRole'
347
+
```
348
+
349
+
The following shows an example of the output:
350
+
351
+
```json
352
+
{
353
+
"value": [
354
+
{
355
+
"properties": {
356
+
"roleName": "Billing Reader Plus",
357
+
"type": "CustomRole",
358
+
"description": "Read billing data and download invoices",
To list the details of a specific role, use the [Role Definitions - Get](/rest/api/authorization/roledefinitions/get) or [Role Definitions - Get By Id](/rest/api/authorization/roledefinitions/getbyid) REST API.
@@ -368,6 +417,42 @@ To list the details of a specific role, use the [Role Definitions - Get](/rest/a
368
417
369
418
1. Replace *{roleDefinitionId}* with the role definition identifier.
370
419
420
+
The following request lists the [Reader](built-in-roles.md#reader) role definition:
421
+
422
+
```http
423
+
GET https://management.azure.com/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2015-07-01
424
+
```
425
+
426
+
The following shows an example of the output:
427
+
428
+
```json
429
+
{
430
+
"properties": {
431
+
"roleName": "Reader",
432
+
"type": "BuiltInRole",
433
+
"description": "Lets you view everything, but not make any changes.",
0 commit comments