Skip to content

Commit 95e3e17

Browse files
committed
Edits to list role definitions
1 parent 5a4e6cd commit 95e3e17

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

articles/role-based-access-control/role-definitions-list.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ az role definition list --name "Virtual Machine Contributor" --output json | jq
310310

311311
## REST API
312312

313-
## List role definitions
313+
### List role definitions
314314

315315
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.
316316

@@ -338,17 +338,22 @@ To list role definitions, use the [Role Definitions - List](/rest/api/authorizat
338338
> | Filter | Description |
339339
> | --- | --- |
340340
> | `$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`. |
342342
343343
### List a role definition
344344
345345
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.
346346
347-
1. Start with one of the following requests:
347+
1. Start with the following request:
348348
349349
```http
350350
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
352357
```
353358
354359
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
360365
> | `subscriptions/{subscriptionId1}` | Subscription |
361366
> | `subscriptions/{subscriptionId1}/resourceGroups/myresourcegroup1` | Resource group |
362367
> | `subscriptions/{subscriptionId1}/resourceGroups/myresourcegroup1/providers/Microsoft.Web/sites/mysite1` | Resource |
363-
364-
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).
365368
366369
1. Replace *{roleDefinitionId}* with the role definition identifier.
367370

0 commit comments

Comments
 (0)