OptionalrequestOptions: UsersClient.RequestOptions
Request-specific configuration.
Create a new user for a given database or passwordless connection.
Note: connection is required but other parameters such as email and password are dependent upon the type of connection.
OptionalrequestOptions: UsersClient.RequestOptions
Request-specific configuration.
Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it.
For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com.
Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case.
OptionalrequestOptions: UsersClient.RequestOptions
Request-specific configuration.
Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see Retrieve Users with the Get Users Endpoint.
ID of the user to retrieve.
OptionalrequestOptions: UsersClient.RequestOptions
Request-specific configuration.
Delete a user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see Delete Users.
ID of the user to delete.
OptionalrequestOptions: UsersClient.RequestOptions
Request-specific configuration.
Update a user.
These are the attributes that can be updated at the root level:
Some considerations:
user_metadata and app_metadata). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.email, email_verified, phone_number, phone_verified, username or password of a secondary identity, you need to specify the connection property too.email or phone_number you can specify, optionally, the client_id property.email_verified is not supported for enterprise and passwordless sms connections.blocked to false does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.null as the value.Updating a field (non-metadata property)
To mark the email address of a user as verified, the body to send should be:
{ "email_verified": true }
Updating a user metadata root property
Let's assume that our test user has the following user_metadata:
{ "user_metadata" : { "profileCode": 1479 } }
To add the field addresses the body to send should be:
{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}
The modified object ends up with the following user_metadata property:
{
"user_metadata": {
"profileCode": 1479,
"addresses": { "work_address": "100 Industrial Way" }
}
}
Updating an inner user metadata property
If there's existing user metadata to which we want to add "home_address": "742 Evergreen Terrace" (using the addresses property) we should send the whole addresses object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be:
{
"user_metadata": {
"addresses": {
"work_address": "100 Industrial Way",
"home_address": "742 Evergreen Terrace"
}
}
}
The modified object ends up with the following user_metadata property:
{
"user_metadata": {
"profileCode": 1479,
"addresses": {
"work_address": "100 Industrial Way",
"home_address": "742 Evergreen Terrace"
}
}
}
ID of the user to update.
OptionalrequestOptions: UsersClient.RequestOptions
Request-specific configuration.
Remove an existing multi-factor authentication (MFA) recovery code and generate a new one. If a user cannot access the original device or account used for MFA enrollment, they can use a recovery code to authenticate.
ID of the user to regenerate a multi-factor authentication recovery code for.
OptionalrequestOptions: UsersClient.RequestOptions
Request-specific configuration.
Revokes selected resources related to a user (sessions, refresh tokens, ...).
ID of the user.
OptionalrequestOptions: UsersClient.RequestOptions
Request-specific configuration.
Protected Readonly_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_
This endpoint retrieves details of users. It's best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can:
This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.
Use the
qquery parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in
app_metadataoruser_metadata) or using leading wildcards.