[[reference-security-query_user]]

////////
===========================================================================================================================
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
||        ██████╗ ███████╗ █████╗ ██████╗ ███╗   ███╗███████╗                                                            ||
||        ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝                                                            ||
||        ██████╔╝█████╗  ███████║██║  ██║██╔████╔██║█████╗                                                              ||
||        ██╔══██╗██╔══╝  ██╔══██║██║  ██║██║╚██╔╝██║██╔══╝                                                              ||
||        ██║  ██║███████╗██║  ██║██████╔╝██║ ╚═╝ ██║███████╗                                                            ||
||        ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═════╝ ╚═╝     ╚═╝╚══════╝                                                            ||
||                                                                                                                       ||
||                                                                                                                       ||
||    This file is autogenerated, DO NOT send pull requests that changes this file directly.                             ||
||    You should update the script that does the generation, which can be found in:                                      ||
||    https://github.com/elastic/elastic-client-generator-js                                                             ||
||                                                                                                                       ||
||    You can run the script with the following command:                                                                 ||
||       npm run elasticsearch -- --version <version>                                                                    ||
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
===========================================================================================================================
////////

[discrete]
=== client.security.queryUser

Find users with a query. Get information for users in a paginated manner. You can optionally filter the results with a query.

{ref}/security-api-query-user.html[{es} documentation]

[discrete]
==== Function signature

[source,ts]
----
(SecurityQueryUserRequest, options?): Promise<SecurityQueryUserResponse>
----

[discrete]
===== `SecurityQueryUserRequest`

[source,ts]
----
interface SecurityQueryUserRequest extends <<shared-type-request-base, RequestBase>> {
  with_profile_uid?: boolean
  query?: SecurityQueryUserUserQueryContainer
  from?: <<shared-type-integer, integer>>
  sort?: <<shared-type-sort, Sort>>
  size?: <<shared-type-integer, integer>>
  search_after?: <<shared-type-sort-results, SortResults>>
}
----

[discrete]
===== `SecurityQueryUserResponse`

[source,ts]
----
interface SecurityQueryUserResponse {
  total: <<shared-type-integer, integer>>
  count: <<shared-type-integer, integer>>
  users: SecurityQueryUserQueryUser[]
}
----

