Role Definitions - Get
Get role definition by name (GUID).
GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}?api-version=2022-04-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
role
|
path | True |
|
The ID of the role definition. |
|
scope
|
path | True |
|
The scope of the role definition. |
|
api-version
|
query | True |
|
The API version to use for this operation. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK - Returns information about the role definition. |
|
| Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Get role definition by name
Sample Request
Sample Response
{
"properties": {
"roleName": "Role name",
"type": "roletype",
"description": "Role description",
"assignableScopes": [
"/subscriptions/subId"
],
"permissions": [
{
"actions": [
"action"
],
"notActions": [],
"dataActions": [
"dataAction"
],
"notDataActions": []
}
]
},
"id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId",
"type": "Microsoft.Authorization/roleDefinitions",
"name": "roleDefinitionId"
}
Definitions
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
| Permission |
Role definition permissions. |
|
Role |
Role definition. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
|
The additional info. |
| type |
|
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
|
The error code. |
| details |
The error details. |
|
| message |
|
The error message. |
| target |
|
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
Permission
Role definition permissions.
| Name | Type | Description |
|---|---|---|
| actions |
|
Allowed actions. |
| dataActions |
|
Allowed Data actions. |
| notActions |
|
Denied actions. |
| notDataActions |
|
Denied Data actions. |
RoleDefinition
Role definition.
| Name | Type | Description |
|---|---|---|
| id |
|
The role definition ID. |
| name |
|
The role definition name. |
| properties.assignableScopes |
|
Role definition assignable scopes. |
| properties.createdBy |
|
Id of the user who created the assignment |
| properties.createdOn |
|
Time it was created |
| properties.description |
|
The role definition description. |
| properties.permissions |
Role definition permissions. |
|
| properties.roleName |
|
The role name. |
| properties.type |
|
The role type. |
| properties.updatedBy |
|
Id of the user who updated the assignment |
| properties.updatedOn |
|
Time it was updated |
| type |
|
The role definition type. |