# Find users with a query **POST /_security/_query/user** **All methods and paths for this operation:**
GET /_security/_query/user
POST /_security/_query/user
Get information for users in a paginated manner. You can optionally filter the results with a query. NOTE: As opposed to the get user API, built-in users are excluded from the result. This API is only for native users. ## Required authorization * Cluster privileges: `read_security` ## Servers - http://api.example.com: http://api.example.com () ## Authentication methods - Api key auth - Basic auth - Bearer auth ## Parameters #### Query parameters - **with_profile_uid** (boolean) Determines whether to retrieve the user profile UID, if it exists, for the users. ## Body parameters Content-type: application/json - **query** (object) A query to filter which users to return. If the query parameter is missing, it is equivalent to a `match_all` query. The query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`, `ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`. You can query the following information associated with user: `username`, `roles`, `enabled`, `full_name`, and `email`. - **from** (number) The starting document offset. It must not be negative. By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. To page through more hits, use the `search_after` parameter. - **sort** (string | object | array[string | object]) The sort definition. Fields eligible for sorting are: `username`, `roles`, `enabled`. In addition, sort can also be applied to the `_doc` field to sort by index order. - **size** (number) The number of hits to return. It must not be negative. By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. To page through more hits, use the `search_after` parameter. - **search_after** (array[number | string | boolean | null]) The search after definition ## Responses ### 200: #### Body Parameters: application/json (object) - **total** (number) The total number of users found. - **count** (number) The number of users returned in the response. - **users** (array[object]) A list of users that match the query. [Powered by Bump.sh](https://bump.sh)