View Source Auth0.Management.Users (Auth0Api v2.2.0)

Summary

Functions

Assign permissions to a user.

Assign one or more existing user roles to a user.

Create a new user for a given database or passwordless connection.

Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed.

Delete a user by user ID. This action cannot be undone.

Remove the authentication method with the given ID from the specified user.

Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone.

Remove all authenticators registered to a given user ID, such as OTP, email, phone, and push-notification. This action cannot be undone.

Remove a multifactor authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider.

Delete all refresh tokens for a user.

Delete all sessions for a user.

Retrieve user details. A list of fields to include or exclude may also be specified.

Retrieve the first multi-factor authentication enrollment that a specific user has confirmed.

Retrieve log events for a specific user.

Retrieve list of the specified user's current Organization memberships. User must be specified by user ID.

Retrieve all permissions associated with the user.

Retrieve details for a user's refresh tokens.

Retrieve detailed list of all user roles currently assigned to a user.

Retrieve details for a user's sessions.

Invalidate all remembered browsers across all authentication factors for a user.

Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities.

Retrieve details of users.

Retrieve detailed list of authentication methods associated with a specified user.

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.

Remove permissions from a user.

Remove one or more specified user roles assigned to a user.

Revokes selected resources related to a user (sessions, refresh tokens, ...).

Unlink a specific secondary account from a target user. This action requires the ID of both the target user and the secondary account.

Modify the authentication method with the given ID from the specified user.

Replace the specified user authentication methods with supplied values.

Types

Link to this type

authentication_method_id()

View Source
@type authentication_method_id() :: String.t()
@type config() :: Auth0.Config.t()
@type error() :: {:error, integer(), term()} | {:error, term()}
@type id() :: String.t()
@type provider() :: String.t()
@type user_id() :: String.t()

Functions

Link to this function

assign_permissions(id, params, config)

View Source
@spec assign_permissions(id(), map(), config()) :: {:ok, String.t()} | error()

Assign permissions to a user.

see

https://auth0.com/docs/api/management/v2/users/post-permissions

Link to this function

assign_roles(id, params, config)

View Source
@spec assign_roles(id(), map(), config()) :: {:ok, String.t()} | error()

Assign one or more existing user roles to a user.

see

https://auth0.com/docs/api/management/v2/users/post-user-roles

@spec create(map(), config()) :: {:ok, map()} | error()

Create a new user for a given database or passwordless connection.

see

https://auth0.com/docs/api/management/v2/users/post-users

Link to this function

create_authentication_methods(id, params, config)

View Source
@spec create_authentication_methods(id(), map(), config()) :: {:ok, map()} | error()

Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed.

see

https://auth0.com/docs/api/management/v2/users/post-authentication-methods

@spec delete(id(), config()) :: {:ok, String.t()} | error()

Delete a user by user ID. This action cannot be undone.

see

https://auth0.com/docs/api/management/v2/users/delete-users-by-id

Link to this function

delete_authentication_method(id, authentication_method_id, config)

View Source
@spec delete_authentication_method(id(), authentication_method_id(), config()) ::
  {:ok, String.t()} | error()

Remove the authentication method with the given ID from the specified user.

see

https://auth0.com/docs/api/management/v2/users/delete-authentication-methods-by-authentication-method-id

Link to this function

delete_authentication_methods(id, config)

View Source
@spec delete_authentication_methods(id(), config()) :: {:ok, String.t()} | error()

Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone.

see

https://auth0.com/docs/api/management/v2/users/delete-authentication-methods

Link to this function

delete_authenticators(id, config)

View Source
@spec delete_authenticators(id(), config()) :: {:ok, String.t()} | error()

Remove all authenticators registered to a given user ID, such as OTP, email, phone, and push-notification. This action cannot be undone.

see

https://auth0.com/docs/api/management/v2/users/delete-authenticators

Link to this function

delete_multifactor(id, params, config)

View Source
@spec delete_multifactor(id(), map(), config()) :: {:ok, String.t()} | error()

Remove a multifactor authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider.

see

https://auth0.com/docs/api/management/v2/users/delete-multifactor-by-provider

Link to this function

delete_refresh_tokens(id, config)

View Source
@spec delete_refresh_tokens(id(), config()) :: {:ok, String.t()} | error()

Delete all refresh tokens for a user.

see

https://auth0.com/docs/api/management/v2/users/delete-refresh-tokens-for-user

Link to this function

delete_sessions(id, config)

View Source
@spec delete_sessions(id(), config()) :: {:ok, String.t()} | error()

Delete all sessions for a user.

see

https://auth0.com/docs/api/management/v2/users/delete-sessions-for-user

@spec get(id(), map(), config()) :: {:ok, map()} | error()

Retrieve user details. A list of fields to include or exclude may also be specified.

see

https://auth0.com/docs/api/management/v2/users/get-users-by-id

Link to this function

get_authentication_method(id, authentication_method_id, config)

View Source
@spec get_authentication_method(id(), authentication_method_id(), config()) ::
  {:ok, map()} | error()

Get an authentication method by ID

see

https://auth0.com/docs/api/management/v2/users/get-authentication-methods-by-authentication-method-id

Link to this function

get_enrollments(id, config)

View Source
@spec get_enrollments(id(), config()) :: {:ok, [map()]} | error()

Retrieve the first multi-factor authentication enrollment that a specific user has confirmed.

see

https://auth0.com/docs/api/management/v2/users/get-enrollments

Link to this function

get_logs(id, params, config)

View Source
@spec get_logs(id(), map(), config()) :: {:ok, [map()] | map()} | error()

Retrieve log events for a specific user.

see

https://auth0.com/docs/api/management/v2/users/get-logs-by-user

Link to this function

get_organizations(id, params, config)

View Source
@spec get_organizations(id(), map(), config()) :: {:ok, [map()] | map()} | error()

Retrieve list of the specified user's current Organization memberships. User must be specified by user ID.

see

https://auth0.com/docs/api/management/v2/users/get-user-organizations

Link to this function

get_permissions(id, params, config)

View Source
@spec get_permissions(id(), map(), config()) :: {:ok, [map()] | map()} | error()

Retrieve all permissions associated with the user.

see

https://auth0.com/docs/api/management/v2/users/get-permissions

Link to this function

get_refresh_tokens(id, params, config)

View Source
@spec get_refresh_tokens(id(), map(), config()) :: {:ok, map()} | error()

Retrieve details for a user's refresh tokens.

see

https://auth0.com/docs/api/management/v2/users/get-refresh-tokens-for-user

Link to this function

get_roles(id, params, config)

View Source
@spec get_roles(id(), map(), config()) :: {:ok, [map()] | map()} | error()

Retrieve detailed list of all user roles currently assigned to a user.

see

https://auth0.com/docs/api/management/v2/users/get-user-roles

Link to this function

get_sessions(id, params, config)

View Source
@spec get_sessions(id(), map(), config()) :: {:ok, map()} | error()

Retrieve details for a user's sessions.

see

https://auth0.com/docs/api/management/v2/users/get-sessions-for-user

Link to this function

invalidate_remembered_browser_for_multifactor(id, config)

View Source
@spec invalidate_remembered_browser_for_multifactor(id(), config()) ::
  {:ok, String.t()} | error()

Invalidate all remembered browsers across all authentication factors for a user.

see

https://auth0.com/docs/api/management/v2/users/post-invalidate-remember-browser

@spec list(map(), config()) :: {:ok, [map()] | map()} | error()

Retrieve details of users.

see

https://auth0.com/docs/api/management/v2/users/get-users

Link to this function

list_authentication_methods(id, params, config)

View Source
@spec list_authentication_methods(id(), map(), config()) ::
  {:ok, [map()] | map()} | error()

Retrieve detailed list of authentication methods associated with a specified user.

see

https://auth0.com/docs/api/management/v2/users/get-authentication-methods

Link to this function

regenerate_recovery_code(id, config)

View Source
@spec regenerate_recovery_code(id(), config()) :: {:ok, map()} | error()

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.

see

https://auth0.com/docs/api/management/v2/users/post-recovery-code-regeneration

Link to this function

remove_permissions(id, params, config)

View Source
@spec remove_permissions(id(), map(), config()) :: {:ok, String.t()} | error()

Remove permissions from a user.

see

https://auth0.com/docs/api/management/v2/users/delete-permissions

Link to this function

remove_roles(id, params, config)

View Source
@spec remove_roles(id(), map(), config()) :: {:ok, String.t()} | error()

Remove one or more specified user roles assigned to a user.

see

https://auth0.com/docs/api/management/v2/users/delete-user-roles

Link to this function

revoke_selected_resources(id, params \\ %{}, config \\ %Config{})

View Source
@spec revoke_selected_resources(id(), map(), config()) :: {:ok, String.t()} | error()

Revokes selected resources related to a user (sessions, refresh tokens, ...).

see

https://auth0.com/docs/api/management/v2/users/user-revoke-access

Link to this function

update(id, params, config)

View Source
@spec update(id(), map(), config()) :: {:ok, map()} | error()

Update a user.

see

https://auth0.com/docs/api/management/v2/users/patch-users-by-id

Link to this function

update_authentication_method(id, authentication_method_id, params, config)

View Source
@spec update_authentication_method(id(), authentication_method_id(), map(), config()) ::
  {:ok, map()} | error()

Modify the authentication method with the given ID from the specified user.

see

https://auth0.com/docs/api/management/v2/users/patch-authentication-methods-by-authentication-method-id

Link to this function

update_authentication_methods(id, params, config)

View Source
@spec update_authentication_methods(id(), map(), config()) :: {:ok, [map()]} | error()

Replace the specified user authentication methods with supplied values.

see

https://auth0.com/docs/api/management/v2/users/put-authentication-methods