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-definitions-list.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -310,7 +310,7 @@ az role definition list --name "Virtual Machine Contributor" --output json | jq
310
310
311
311
## REST API
312
312
313
-
## List role definitions
313
+
###List role definitions
314
314
315
315
To list role definitions, use the [Role Definitions - List](/rest/api/authorization/roledefinitions/list) REST API. To refine your results, you specify a scope and an optional filter.
316
316
@@ -338,17 +338,22 @@ To list role definitions, use the [Role Definitions - List](/rest/api/authorizat
338
338
> | Filter | Description |
339
339
> | --- | --- |
340
340
> | `$filter=atScopeAndBelow()` | Lists role definitions for the specified scope and any subscopes. |
341
-
> | `$filter=Type+eq+'{type}'` | Lists role definitions of the specified type. Type of role can be `CustomRole` or `BuiltInRole`. |
341
+
> | `$filter=type+eq+'{type}'` | Lists role definitions of the specified type. Type of role can be `CustomRole` or `BuiltInRole`. |
342
342
343
343
### List a role definition
344
344
345
345
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.
346
346
347
-
1. Start with one of the following requests:
347
+
1. Start with the following request:
348
348
349
349
```http
350
350
GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}?api-version=2015-07-01
351
-
GET https://management.azure.com/{roleDefinitionId}?api-version=2015-07-01
351
+
```
352
+
353
+
For a directory-level role definition, you can use this request:
354
+
355
+
```http
356
+
GET https://management.azure.com/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}?api-version=2015-07-01
352
357
```
353
358
354
359
1. Within the URI, replace *{scope}* with the scope for which you want to list the role definition.
@@ -360,8 +365,6 @@ To list the details of a specific role, use the [Role Definitions - Get](/rest/a
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).
365
368
366
369
1. Replace *{roleDefinitionId}* with the role definition identifier.
0 commit comments