Search for users
Authgear Admin GraphQL API supports searching user by keywords. Keywords include email, phone number, username, SSO subject id and standard attributes.
Search users by email
You can use the user search query to search user by email and obtains the user details.
In the following example, the project wants to search the user by email and check if they haven't set up the TOTP authenticator.
You can adjust the fields in the query based on your needs. To explore more supporting fields, you can try it out via the GraphiQL tool.
The query has a maximum limit of 20, pagination parameters should be provided to obtain all the results. See detail.
The query
The sample response
Pagination
The query
The sample response
Parameters
searchKeyword
: Search for users by specified keyword.first
: The number of items to be returned. Maximum is20
.after
: A cursor for use in pagination. You can pass the cursor value of the last edges item to a subsequent call to fetch the next page of results.sortBy
: The field in which to order users. Supported values:CREATED_AT
orLAST_LOGIN_AT
.sortDirection
: The direction in which to order users by the specified field. Supported values:ASC
orDESC
.
Last updated
Was this helpful?