---
title: "List all user roles"
method: GET
path: "/user-roles"
tags: ["Users"]
---

# List all user roles

`GET /user-roles`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/user-roles`
- Auth: HTTP bearer

Returns a list of all user roles in an organization. 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

To use this endpoint, select **Read Users** under the Setup & Administration category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

## Query parameters

- `limit` integer
- `after` string

## Response `200`

List all user roles.

- ListUserRolesResponse: A list of user roles.
  - `data` UserRole[]: A list of user roles
    - `id` string: The unique ID for the role.
    - `name` string: The name of the role.
  - `pagination` PaginationResponse: Pagination parameters.
    - `endCursor` string, string, required: Cursor identifier representing the last element in the response. This value should be used in conjunction with a subsequent request's 'after' query parameter. This may be an empty string if there are no more pages left to view.
    - `hasNextPage` boolean, required: True if there are more pages of results immediately available after this endCursor.

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
