---
title: "Get users with fuzzy search"
method: GET
path: "/resources/users/v1/query/phrase"
tags: ["User management"]
---

# Get users with fuzzy search

`GET /resources/users/v1/query/phrase`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/users/v1/query/phrase`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/users/v1/query/phrase/get.ts> (a function with typed inputs; its response is checked against the schema)

This route retrieves all users for a specific tenant or environment. To filter by tenant, include the tenant's ID in the **`frontegg-tenant-id`** header; otherwise, leave it empty to retrieve users from all tenants. In addition to all standard Get users query params, this route supports phrase search, allowing for complex queries using parameters such as contains, excludes, optional and approximate matching.

## Query parameters

- `_limit` number
- `_includeSubTenants` boolean
- `_phraseSearchContains` string[]
- `_phraseSearchExcludes` string[]
- `_phraseSearchOptional` string[]
- `_phraseSearchApproximate` boolean
- `_offset` number
- `_email` string
- `_tenantId` string
- `ids` string
- `_sortBy` 'createdAt' | 'name' | 'email' | 'id' | 'verified' | 'isLocked' | 'provider' | 'tenantId'
- `_order` 'ASC' | 'DESC'

## Headers

- `frontegg-tenant-id` string

## Response `200`

- UserV3Dto
  - `id` string, required
  - `email` string, required
  - `name` string
  - `profilePictureUrl` string
  - `sub` string, required
  - `verified` boolean, required
  - `mfaEnrolled` boolean, required
  - `mfaBypass` boolean
  - `phoneNumber` string
  - `provider` string, required
  - `tenantId` string, required
  - `tenantIds` string[], required
  - `activatedForTenant` boolean
  - `isLocked` boolean
  - `tenants` UserTenantDto[], required
    - `tenantId` string, required
    - `roles` RoleResponse[], required
      - `id` string, required
      - `vendorId` string, required
      - `tenantId` string, required
      - `key` string, required
      - `name` string, required
      - `description` string, required
      - `isDefault` boolean, required
      - `firstUserRole` boolean, required
      - `level` number, required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
      - `permissions` string[], required
    - `temporaryExpirationDate` string, date-time
    - `isDisabled` boolean
  - `invisible` boolean
  - `superUser` boolean
  - `metadata` string, required
  - `vendorMetadata` string, required
  - `createdAt` string, date-time, required
  - `lastLogin` string, date-time, required
  - `subAccountAccessAllowed` boolean, required
  - `managedBy` 'frontegg' | 'scim2' | 'external'

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
