---
title: "List Users"
method: GET
path: "/v2/facts/{proj_id}/{env_id}/users"
tags: ["Users"]
---

# List Users

`GET /v2/facts/{proj_id}/{env_id}/users`

Lists all the users defined within an environment.

## Path parameters

- `proj_id` string, required — Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").
- `env_id` string, required — Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

## Query parameters

- `search` string — Text search for the user
- `search_operator` 'startswith' | 'endswith' | 'contains' — An enumeration.
- `role` string — Match users with a specific role. To filter users without any roles, send an empty string.
- `include_resource_instance_roles` boolean — Should add resource instance roles
- `page` integer — Page number of the results to fetch, starting at 1.
- `per_page` integer — The number of results per page (max 100).

## Response `200`

Successful Response

- PaginatedResultUserRead
  - `data` UserRead[], required — List of Users
    - `key` string, required — A unique id by which Permit will identify the user for permission checks.
    - `id` string, uuid, required — Unique id of the user
    - `organization_id` string, uuid, required — Unique id of the organization that the user belongs to.
    - `project_id` string, uuid, required — Unique id of the project that the user belongs to.
    - `environment_id` string, uuid, required — Unique id of the environment that the user belongs to.
    - `associated_tenants` UserInTenant[]
      - `tenant` string, required — The tenant key which the user is associated with
      - `roles` string[], required — List of roles assigned to the user in that tenant
      - `status` 'active' | 'pending', required — An enumeration.
      - `resource_instance_roles` UserResourceInstanceRole[]
        - `resource_instance` string, required — The resource instance key which the role is associated with
        - `resource` string, required — The resource type which the role is associated with
        - `role` string, required — The role key of this resource role
    - `roles` UserRole[]
      - `role` string, required — the role that is assigned
      - `tenant` string, required — the tenant the role is associated with
    - `created_at` string, date-time, required — Date and time when the user was created (ISO_8601 format).
    - `updated_at` string, date-time, required — Date and time when the user was last updated/modified (ISO_8601 format).
    - `email` string, email — The email of the user. If synced, will be unique inside the environment.
    - `first_name` string — First name of the user.
    - `last_name` string — Last name of the user.
    - `attributes` object — Arbitrary user attributes that will be used to enforce attribute-based access control policies.
  - `total_count` integer, required
  - `page_count` integer

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/permit/apis/permit-io-api.md) · [All operations](https://skmtc.net/permit/apis/permit-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/permit/permit-io-api/versions/f3391dcb29a4/schema)
