---
title: "Get User Roles"
method: GET
path: "/users/{userId}/roles"
tags: ["User"]
---

# Get User Roles

`GET /users/{userId}/roles`

Returns roles for a specific user

## Path parameters

- `userId` string, required

## Headers

- `tenant-id` string

## Response `200`

User roles retrieved successfully

- UserRolesResponseDto — User roles response containing list of roles
  - `data` RoleDetails1[] — List of roles assigned to the user
    - `id` string
    - `userId` string
    - `tenantId` string
    - `roleId` string
    - `createdAt` string, date-time
    - `createdBy` string
  - `totalCount` integer — Total number of roles assigned to the user
  - `links` PageLinks1
    - `self` string
    - `next` string
    - `prev` string

## Other responses

- `400` — Bad request - Invalid request parameters or missing required headers
- `401` — Authentication required - Valid authentication token is missing or invalid
- `403` — Forbidden - User does not have the required permissions to read user roles
- `500` — Internal server error - An unexpected error occurred while processing the request

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/versions/3d27e9019c7b/schema)
