---
title: "List user roles"
method: GET
path: "/authz/user_role"
tags: ["Role and grant"]
---

# List user roles

`GET /authz/user_role`

Lists all roles assigned to users in your organization.

## Query parameters

- `user_id` integer, required
- `nrn` string, required
- `include` 'pending'

## Response `200`

The operation was successful.

- UserRolePaginatedResponse[]
  - `user_id` integer, required — The unique ID of the user that has been assigned roles.
  - `grants` UserRoleResponse[], required
    - `id` integer, required — The unique ID of the grant.
    - `nrn` string, required — The NRN of the resource where the user's role is assigned.
    - `status` 'active' | 'pending' — The status of the user's role assignment. > • `active`: The user has been granted the role and currently has access. > > • `pending`: The role assignment is awaiting approval; access is not yet granted.
    - `role` object, required
      - `id` integer, required — The ID of the role assigned to the user
      - `name` string, required — The human-readable name of the role.
      - `slug` string, required — The slug of the role.
      - `description` string — A brief description of the role's purpose and permissions.
      - `level` string, nullable — The level of the role within the organization hierarchy.
      - `can_assign_roles` object[] — List of role that this role can assign to other users. > ℹ️ If the role cannot assign any roles, we return an empty array.
        - `id` integer, required — The ID of the role that can be assigned.
        - `name` string, required — The human-readable name of the role that can be assigned.
        - `slug` string, required — The slug of the role that can be assigned.
        - `description` string — A brief description of the role's purpose and permissions.
        - `level` string, nullable — The level of the role within the organization hierarchy.
        - `assignment_restriction` 'PERSON' | 'MACHINE', nullable — Indicates any restrictions on assigning this role, depending on the user type.

## Other responses

- `4XX` — Client error responses due to invalid input or missing parameters.
- `5XX` — Server error responses indicating an issue on the API side.

---

[API](https://skmtc.dev/nullplatform/apis/nullplatform-api.md) · [All operations](https://skmtc.dev/nullplatform/apis/nullplatform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nullplatform/nullplatform-api/revisions/1c4ea154b159/schema)
