# Assigned Roles

This resource lets you work with roles assigned to a user or a group in YouTrack.

Available since YouTrack 2026.1.

|  Resource  |     ```GENERIC /api/assignedRoles ```    |
| --- | --- |
|  Returned entity  |  [AssignedRole](api-entity-AssignedRole.html). For the description of the entity attributes, see [Supported Fields](#AssignedRole-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Read a List of AssignedRoles](#get_all-AssignedRole-method).    |

## AssignedRole attributes

Represents a role assigned to a user or a group in a specific scope.

Available since YouTrack 2026.1.

### Attributes

This table describes attributes of the `AssignedRole` entity.

* To receive an attribute in the response from the server, specify it explicitly in the `fields` request parameter.

* To update an attribute, provide it in the body of a POST request.

|  Field  |  Type  |  Description  |
| --- | --- | --- |
|  id  |  String  |  The database ID of the assigned role. `Read-only`.  |
|  role  |  [Role](api-entity-Role.html)  |  The role that is assigned.  |
|  scope  |  [AccessScope](api-entity-AccessScope.html)  |  The scope where the role is assigned. Possible values: Global, Organization, or Project.  |
|  holder  |      * [User](api-entity-User.html)    * [UserGroup](api-entity-UserGroup.html)    |  The user or group that holds the role. `Read-only`.  |

## Read a List of AssignedRoles

Get all roles assigned to a user or a group.

Filter the roles by the role holder using query.

### Required permissions

For global roles, requires Low-level Admin Read permission.

For organization roles, requires Update Organization permission.

For project roles, requires Update Project permission.

### Request syntax

```GENERIC
GET /api/assignedRoles?{fields}&{$top}&{$skip}&{query}
```

|  null  |  The database ID of AssignedRole  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of AssignedRole attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |
|  $skip  |  Int  |  Optional. Lets you set a number of returned entities to skip before returning the first one.  |
|  $top  |  Int  |     Optional. Lets you specify the maximum number of entries that are returned in the response. If you don't set the $top value, the server limits the maximum number of returned entries.       The server returns a maximum of 42 entries for most resources that return collections. For more information, see [Pagination](api-concept-pagination.html).     |
|  query  |  String  |     Filter the roles by the role holder using query.       The query is a string in the following format: `holder:ID` where ID stands for the database ID of the user or group.     |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/assignedRoles?query=holder:24-2&fields=id,role(id,name,description),holder(id,login),scope(id)
```

#### Sample response body

```JSON
[
  {
    "role": {
      "description": "Developer has the same access rights as Reporter and can also change all issues attributes.",
      "name": "Developer",
      "id": "28-21",
      "$type": "Role"
    },
    "holder": {
      "id": "23-2",
      "$type": "NestedGroup"
    },
    "scope": {
      "id": "549-6",
      "$type": "ProjectScope"
    },
    "id": "31-23",
    "$type": "AssignedRole"
  },
  {
    "role": {
      "description": null,
      "name": "Article Reader",
      "id": "28-33",
      "$type": "Role"
    },
    "holder": {
      "login": "john.smith",
      "id": "24-2",
      "$type": "User"
    },
    "scope": {
      "id": "544-0",
      "$type": "GlobalScope"
    },
    "id": "31-26",
    "$type": "AssignedRole"
  },
  {
    "role": {
      "description": "Reporter may create new issues and comments, view existing issues and comments, and manage own profile.",
      "name": "Reporter",
      "id": "28-23",
      "$type": "Role"
    },
    "holder": {
      "login": "john.smith",
      "id": "24-2",
      "$type": "User"
    },
    "scope": {
      "id": "550-0",
      "$type": "OrganizationScope"
    },
    "id": "31-56",
    "$type": "AssignedRole"
  },
  {
    "role": {
      "description": "Developer has the same access rights as Reporter and can also change all issues attributes.",
      "name": "Developer",
      "id": "28-21",
      "$type": "Role"
    },
    "holder": {
      "id": "574-7",
      "$type": "ProjectTeam"
    },
    "scope": {
      "id": "549-7",
      "$type": "ProjectScope"
    },
    "id": "31-21",
    "$type": "AssignedRole"
  }
]
```

