---
title: "Get the users directly granted a role"
method: GET
path: "/api/v1/roles/{roleid}/users"
tags: ["Roles"]
---

# Get the users directly granted a role

`GET /api/v1/roles/{roleid}/users`

## Request

- Base URL: `https://docs.anzworldline-solutions.com.au`
- URL: `https://docs.anzworldline-solutions.com.au/api/v1/roles/{roleid}/users`
- Auth: none declared
- TypeScript: <https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/docs/api/v1/roles/:roleid/users/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the paginated list of users directly granted the given role, using the standard user serialization (email address included). Grants inherited through the role hierarchy are not included.

## Path parameters

- `roleid` string, required

## Query parameters

- `filter` string
- `page` integer
- `per_page` integer
- `orderby` string
- `direction` string

## Response `200`

Users retrieved successfully

- ResponseEntityPaginatedDataView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` object
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400`: Bad request - invalid pagination or sorting parameters
- `401`: Unauthorized - authentication required
- `403`: Forbidden - roles portlet access required
- `404`: Role not found

## Changes

- **2026-10-30** `4fd8e917d458`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/changes/api/v1/roles/:roleid/users/get.md)

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) - [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/revisions/4fd8e917d458?raw)
