Role Assignments - List For Scope
Gets role assignments for a scope.
GET {vaultBaseUrl}/{scope}/providers/Microsoft.Authorization/roleAssignments?api-version=7.3
GET {vaultBaseUrl}/{scope}/providers/Microsoft.Authorization/roleAssignments?$filter={$filter}&api-version=7.3
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
scope
|
path | True |
|
The scope of the role assignments. |
|
vault
|
path | True |
|
The vault name, for example https://myvault.vault.azure.net. |
|
api-version
|
query | True |
|
Client API version. |
|
$filter
|
query |
|
The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK - Returns an array of role assignments. |
|
| Other Status Codes |
Key Vault error response describing why the operation failed. |
Examples
ListRoleAssignments
Sample Request
GET https://myvault.vault.azure.net//keys/providers/Microsoft.Authorization/roleAssignments?api-version=7.3
Sample Response
{
"value": [
{
"properties": {
"roleDefinitionId": "/keys/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId",
"principalId": "principalId",
"scope": "/keys"
},
"id": "/keys/providers/Microsoft.Authorization/roleAssignments/roleAssignmentId",
"type": "Microsoft.Authorization/roleAssignments",
"name": "roleAssignmentId"
}
]
}
Definitions
| Error |
The key vault server error. |
|
Key |
The key vault error exception. |
|
Role |
Role Assignments |
|
Role |
Role assignment list operation result. |
|
Role |
Role assignment properties with scope. |
|
Role |
The role scope. |
Error
The key vault server error.
| Name | Type | Description |
|---|---|---|
| code |
|
The error code. |
| innererror |
The key vault server error. |
|
| message |
|
The error message. |
KeyVaultError
The key vault error exception.
| Name | Type | Description |
|---|---|---|
| error |
The key vault server error. |
RoleAssignment
Role Assignments
| Name | Type | Description |
|---|---|---|
| id |
|
The role assignment ID. |
| name |
|
The role assignment name. |
| properties |
Role assignment properties. |
|
| type |
|
The role assignment type. |
RoleAssignmentListResult
Role assignment list operation result.
| Name | Type | Description |
|---|---|---|
| nextLink |
|
The URL to use for getting the next set of results. |
| value |
Role assignment list. |
RoleAssignmentPropertiesWithScope
Role assignment properties with scope.
| Name | Type | Description |
|---|---|---|
| principalId |
|
The principal ID. |
| roleDefinitionId |
|
The role definition ID. |
| scope |
The role scope. |
RoleScope
The role scope.
| Name | Type | Description |
|---|---|---|
| / |
|
Global scope |
| /keys |
|
Keys scope |