management package

management.auth0 module

class auth0.management.auth0.Auth0(domain: str, token: str, rest_options: RestClientOptions | None = None)[source]

Bases: object

Provides easy access to all endpoint classes

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

management.blacklists module

class auth0.management.blacklists.Blacklists(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 blacklists endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

create(jti: str, aud: str | None = None) dict[str, str][source]

Adds a token to the blacklist.

Args:

jti (str): the jti of the JWT to blacklist.

aud (str, optional): The JWT’s aud claim. The client_id of the

application for which it was issued.

See: https://auth0.com/docs/api/management/v2#!/Blacklists/post_tokens

get(aud: str | None = None) list[dict[str, str]][source]

Retrieves the jti and aud of all tokens in the blacklist.

Args:
aud (str, optional): The JWT’s aud claim. The client_id of the

application for which it was issued.

See: https://auth0.com/docs/api/management/v2#!/Blacklists/get_tokens

management.branding module

class auth0.management.branding.Branding(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 Branding endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

create_branding_theme(body: dict[str, Any]) dict[str, Any][source]

Create branding theme.

Args:

body (dict): The attributes to set on the theme.

See: https://auth0.com/docs/api/management/v2#!/Branding/post_branding_theme

delete_branding_theme(theme_id: str) Any[source]

Delete branding theme.

Args:

theme_id (str): The theme_id to delete branding theme for.

See: https://auth0.com/docs/api/management/v2#!/Branding/delete_branding_theme

delete_template_universal_login() Any[source]

Delete template for New Universal Login Experience. Requires “delete:branding” scope.

See: https://auth0.com/docs/api/management/v2#!/Branding/delete_universal_login

get() dict[str, Any][source]

Retrieve branding settings. Requires “read:branding” scope.

See: https://auth0.com/docs/api/management/v2#!/Branding/get_branding

get_branding_theme(theme_id: str) dict[str, Any][source]

Retrieve branding theme.

Args:

theme_id (str): The theme_id to retrieve branding theme for.

See: https://auth0.com/docs/api/management/v2#!/Branding/get_branding_theme

get_default_branding_theme() dict[str, Any][source]

Retrieve default branding theme.

See: https://auth0.com/docs/api/management/v2#!/Branding/get_default_branding_theme

get_template_universal_login() dict[str, Any][source]

Get template for New Universal Login Experience. Requires “read:branding” scope.

See: https://auth0.com/docs/api/management/v2#!/Branding/get_universal_login

update(body: dict[str, Any]) dict[str, Any][source]

Update branding settings. Requires “update:branding” scope.

Args:

body (dict): Attributes for the updated trigger binding.

See: https://auth0.com/docs/api/management/v2#!/Branding/patch_branding

update_branding_theme(theme_id: str, body: dict[str, Any]) dict[str, Any][source]

Update branding theme.

Args:

theme_id (str): The theme_id to update branding theme for. body (dict): The attributes to set on the theme.

See: https://auth0.com/docs/api/management/v2#!/Branding/patch_branding_theme

update_template_universal_login(body: dict[str, Any]) dict[str, Any][source]

Update template for New Universal Login Experience. Requires “update:branding” scope.

Args:

body (str): Complete HTML content to assign to the template. See linked API documentation for example.

See: https://auth0.com/docs/api/management/v2#!/Branding/put_universal_login

management.client_grants module

class auth0.management.client_grants.ClientGrants(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 client grants endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

all(audience: str | None = None, page: int | None = None, per_page: int | None = None, include_totals: bool = False, client_id: str | None = None)[source]

Retrieves all client grants.

Args:
audience (str, optional): URL encoded audience of a Resource Server

to filter.

page (int, optional): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to False.

client_id (string, optional): The id of a client to filter.

See: https://auth0.com/docs/api/management/v2#!/Client_Grants/get_client_grants

create(body: dict[str, Any]) dict[str, Any][source]

Creates a client grant.

Args:

body (dict): Attributes for the new client grant.

See: https://auth0.com/docs/api/management/v2#!/Client_Grants/post_client_grants

delete(id: str) Any[source]

Deletes a client grant.

Args:

id (str): Id of client grant to delete.

See: https://auth0.com/docs/api/management/v2#!/Client_Grants/delete_client_grants_by_id

update(id: str, body: dict[str, Any]) dict[str, Any][source]

Modifies a client grant.

Args:

id (str): The id of the client grant to modify.

body (dict): Attributes to update.

See: https://auth0.com/docs/api/management/v2#!/Client_Grants/patch_client_grants_by_id

management.clients module

class auth0.management.clients.Clients(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 applications endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

all(fields: list[str] | None = None, include_fields: bool = True, page: int | None = None, per_page: int | None = None, extra_params: dict[str, Any] | None = None) list[dict[str, Any]][source]

Retrieves a list of all the applications.

Important: The client_secret and encryption_key attributes can only be retrieved with the read:client_keys scope.

Args:
fields (list of str, optional): A list of fields to include or

exclude from the result (depending on include_fields). Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

page (int, optional): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

extra_params (dictionary, optional): The extra parameters to add to

the request. The fields, include_fields, page and per_page values specified as parameters take precedence over the ones defined here.

See: https://auth0.com/docs/api/management/v2#!/Clients/get_clients

create(body: dict[str, Any]) dict[str, Any][source]

Create a new application.

Args:

body (dict): Attributes for the new application.

See: https://auth0.com/docs/api/v2#!/Clients/post_clients

delete(id: str) Any[source]

Deletes an application and all its related assets.

Args:

id (str): Id of application to delete.

See: https://auth0.com/docs/api/management/v2#!/Clients/delete_clients_by_id

get(id: str, fields: list[str] | None = None, include_fields: bool = True) dict[str, Any][source]

Retrieves an application by its id.

Important: The client_secret, encryption_key and signing_keys attributes can only be retrieved with the read:client_keys scope.

Args:

id (str): Id of the application to get.

fields (list of str, optional): A list of fields to include or

exclude from the result (depending on include_fields). Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

See: https://auth0.com/docs/api/management/v2#!/Clients/get_clients_by_id

rotate_secret(id: str) dict[str, Any][source]

Rotate a client secret. The generated secret is NOT base64 encoded.

Args:

id (str): Client ID of the application.

See: https://auth0.com/docs/api/management/v2#!/Clients/post_rotate_secret

update(id: str, body: dict[str, Any]) dict[str, Any][source]

Modifies an application.

Important: The client_secret, encryption_key and signing_keys attributes can only be updated with the update:client_keys scope.

Args:

id (str): Client ID of the application.

body (dict): Attributes to modify.

See: https://auth0.com/docs/api/management/v2#!/Clients/patch_clients_by_id

management.connections module

class auth0.management.connections.Connections(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 connection endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

all(strategy: str | None = None, fields: list[str] | None = None, include_fields: bool = True, page: int | None = None, per_page: int | None = None, extra_params: dict[str, Any] | None = None, name: str | None = None) list[dict[str, Any]][source]

Retrieves all connections.

Args:
strategy (str, optional): Only retrieve connections of

this strategy type. (e.g: strategy=’amazon’)

fields (list of str, optional): A list of fields to include or

exclude from the result (depending on include_fields). Leave empty to retrieve all fields. By default, all the fields will be retrieved.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

page (int): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

extra_params (dictionary, optional): The extra parameters to add to

the request. The fields, include_fields, page and per_page values specified as parameters take precedence over the ones defined here.

name (str): Provide the name of the connection to retrieve.

See: https://auth0.com/docs/api/management/v2#!/Connections/get_connections

Returns:

A list of connection objects.

create(body: dict[str, Any]) dict[str, Any][source]

Creates a new connection.

Args:
body (dict): Attributes used to create the connection. Mandatory

attributes are: ‘name’ and ‘strategy’.

See: https://auth0.com/docs/api/management/v2#!/Connections/post_connections

delete(id: str) Any[source]

Deletes a connection and all its users.

Args:

id: Id of the connection to delete.

See: https://auth0.com/docs/api/management/v2#!/Connections/delete_connections_by_id

Returns:

An empty dict.

delete_user_by_email(id: str, email: str) Any[source]

Deletes a specified connection user by its email.

Args:

id (str): The id of the connection (must be a database connection).

email (str): The email of the user to delete.

See: https://auth0.com/docs/api/management/v2#!/Connections/delete_users_by_email

Returns:

An empty dict.

get(id: str, fields: list[str] | None = None, include_fields: bool = True) dict[str, Any][source]

Retrieve connection by id.

Args:

id (str): Id of the connection to get.

fields (list of str, optional): A list of fields to include or

exclude from the result (depending on include_fields). Leave empty to retrieve all fields. By default, all the fields will be retrieved.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

See: https://auth0.com/docs/api/management/v2#!/Connections/get_connections_by_id

Returns:

A connection object.

update(id: str, body: dict[str, Any]) dict[str, Any][source]

Modifies a connection.

Args:

id: Id of the connection.

body (dict): Specifies which fields are to be modified, and to what values.

See: https://auth0.com/docs/api/management/v2#!/Connections/patch_connections_by_id

Returns:

The modified connection object.

management.custom_domains module

class auth0.management.custom_domains.CustomDomains(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 custom domains endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

all() list[dict[str, Any]][source]

Retrieves all custom domains.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/get_custom_domains

create_new(body: dict[str, Any]) dict[str, Any][source]

Configure a new custom domain.

Args:

body (str): The domain, tye and verification method in json.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/post_custom_domains

delete(id: str) Any[source]

Deletes a grant.

Args:

id (str): The id of the custom domain to delete.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/delete_custom_domains_by_id

get(id: str) dict[str, Any][source]

Retrieves custom domain.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/get_custom_domains_by_id

verify(id: str) dict[str, Any][source]

Verify a custom domain.

Args:

id (str): The id of the custom domain to delete.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/post_verify

management.device_credentials module

class auth0.management.device_credentials.DeviceCredentials(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 connection endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

create(body: dict[str, Any]) dict[str, Any][source]

Create a device public key.

Args:
body (dict): parameters for creating the public key (e.g: type,

device_name, client_id, etc).

See: https://auth0.com/docs/api/v2#!/Device_Credentials/post_device_credentials

delete(id: str) Any[source]

Delete credential.

Args:

id (str): The id of the credential to delete.

See: https://auth0.com/docs/api/management/v2#!/Device_Credentials/delete_device_credentials_by_id

get(user_id: str, client_id: str, type: str, fields: list[str] | None = None, include_fields: bool = True, page: int | None = None, per_page: int | None = None, include_totals: bool = False)[source]

List device credentials.

Args:

user_id (str): The user_id of the devices to retrieve.

client_id (str): The client_id of the devices to retrieve.

type (str): The type of credentials (public_key, refresh_token).

fields (list, optional): A list of fields to include or exclude

(depending on include_fields) from the result. Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

page (int, optional): Page index of the results to return. First page is 0.

per_page (int, optional): Number of results per page.

include_totals (bool, optional): True to return results inside an object

that contains the total result count (True) or as a direct array of results (False, default).

See: https://auth0.com/docs/api/management/v2#!/Device_Credentials/get_device_credentials

management.email_templates module

class auth0.management.email_templates.EmailTemplates(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 email templates endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

create(body: dict[str, Any]) dict[str, Any][source]

Create a new email template.

Args:

body (dict): Attributes for the new email template.

See: https://auth0.com/docs/api/management/v2#!/Email_Templates/post_email_templates

get(template_name: str) dict[str, Any][source]

Retrieves an email template by its name.

Args:
template_name (str): Name of the email template to get.

Must be one of: ‘verify_email’, ‘reset_email’, ‘welcome_email’, ‘blocked_account’, ‘stolen_credentials’, ‘enrollment_email’, ‘change_password’, ‘password_reset’, ‘mfa_oob_code’.

See: https://auth0.com/docs/api/management/v2#!/Email_Templates/get_email_templates_by_templateName

update(template_name: str, body: dict[str, Any]) dict[str, Any][source]

Update an existing email template.

Args:
template_name (str): Name of the email template to update.

Must be one of: ‘verify_email’, ‘reset_email’, ‘welcome_email’, ‘blocked_account’, ‘stolen_credentials’, ‘enrollment_email’, ‘change_password’, ‘password_reset’, ‘mfa_oob_code’.

body (dict): Attributes to update on the email template.

See: https://auth0.com/docs/api/management/v2#!/Email_Templates/patch_email_templates_by_templateName

management.emails module

class auth0.management.emails.Emails(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 email endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

config(body: dict[str, Any]) dict[str, Any][source]

Configure the email provider.

Args:

body (dict): attributes of the created email provider.

See: https://auth0.com/docs/api/v2#!/Emails/post_provider

delete() Any[source]

Delete the email provider. (USE WITH CAUTION)

See: https://auth0.com/docs/api/management/v2#!/Emails/delete_provider

get(fields: list[str] | None = None, include_fields: bool = True) dict[str, Any][source]

Get the email provider.

Args:
fields (list of str, optional): A list of fields to include or

exclude from the result (depending on include_fields). Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

See: https://auth0.com/docs/api/management/v2#!/Emails/get_provider

update(body: dict[str, Any]) dict[str, Any][source]

Update the email provider.

Args:

body (dict): attributes to update on the email provider

See: https://auth0.com/docs/api/v2#!/Emails/patch_provider

management.grants module

class auth0.management.grants.Grants(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 grants endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

all(page: int | None = None, per_page: int | None = None, include_totals: bool = False, extra_params: dict[str, Any] | None = None)[source]

Retrieves all grants.

Args:
page (int, optional): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to False.

extra_params (dictionary, optional): The extra parameters to add to

the request. The page, per_page, and include_totals values specified as parameters take precedence over the ones defined here.

See: https://auth0.com/docs/api/management/v2#!/Grants/get_grants

delete(id: str) Any[source]

Deletes a grant.

Args:

id (str): The id of the grant to delete.

See: https://auth0.com/docs/api/management/v2#!/Grants/delete_grants_by_id

management.guardian module

class auth0.management.guardian.Guardian(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 guardian endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

all_factors() list[dict[str, Any]][source]
Retrieves all factors. Useful to check factor enablement and

trial status.

See: https://auth0.com/docs/api/management/v2#!/Guardian/get_factors

create_enrollment_ticket(body: dict[str, Any]) dict[str, Any][source]

Creates an enrollment ticket for user_id

A useful way to send an email to a user, with a link that lead to

start the enrollment process.

Args:

body (dict): Details of the user to send the ticket to.

See: https://auth0.com/docs/api/management/v2#!/Guardian/post_ticket

delete_enrollment(id: str) Any[source]

Deletes an enrollment.

Useful when you want to force re-enroll.

Args:

id (str): The id of the device account to update.

See: https://auth0.com/docs/api/management/v2#!/Guardian/delete_enrollments_by_id

get_enrollment(id: str) dict[str, Any][source]

Retrieves an enrollment. Useful to check its type and related metadata.

Args:

id (str): The id of the device account to update.

See: https://auth0.com/docs/api/management/v2#!/Guardian/get_enrollments_by_id

get_factor_providers(factor_name: str, name: str) dict[str, Any][source]

Get Guardian SNS or SMS factor providers.

Returns provider configuration.

Args:

factor_name (str): Either push-notification or sms.

name (str): Name of the provider.

See: https://auth0.com/docs/api/management/v2#!/Guardian/get_sns

https://auth0.com/docs/api/management/v2#!/Guardian/get_twilio

get_templates() dict[str, Any][source]

Get enrollment and verification templates.

Retrieve both templates. Useful to check if a different template than

default was set.

See: https://auth0.com/docs/api/management/v2#!/Guardian/get_templates

update_factor(name: str, body: dict[str, Any]) dict[str, Any][source]

Update Guardian factor. Useful to enable / disable factor.

Args:

name (str): Either push-notification or sms.

body (dict): Attributes to modify.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_factors_by_name

update_factor_providers(factor_name: str, name: str, body: dict[str, Any]) dict[str, Any][source]

Get Guardian factor providers.

Returns provider configuration.

Args:

factor_name (str): Either push-notification or sms.

name (str): Name of the provider.

body (dict): Details of the factor provider.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_twilio

update_templates(body: dict[str, Any]) dict[str, Any][source]

Update enrollment and verification SMS templates.

Useful to send custom messages on sms enrollment and verification.

Args:

body (dict): Attributes to modify.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_templates

management.hooks module

class auth0.management.hooks.Hooks(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Hooks endpoint implementation.

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

add_secrets(id: str, body: dict[str, Any]) dict[str, Any][source]

Add one or more secrets for an existing hook.

Args:

id (str): The id of the hook to add secrets to.

body (dict): Dict of key-value pairs where the value must be a string.

See: https://auth0.com/docs/api/management/v2#!/Hooks/post_secrets

all(enabled: bool = True, fields: list[str] | None = None, include_fields: bool = True, page: int | None = None, per_page: int | None = None, include_totals: bool = False)[source]

Retrieves a list of all hooks.

Args:
enabled (bool, optional): If provided, retrieves hooks that match

the value, otherwise all hooks are retrieved.

fields (list, optional): A list of fields to include or exclude

(depending on include_fields) from the result, empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise (defaults to true).

page (int, optional): The result’s page number (zero based).

per_page (int, optional): The amount of entries per page.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise.

See: https://auth0.com/docs/api/management/v2#!/Hooks/get_hooks

create(body: dict[str, Any]) dict[str, Any][source]

Creates a new Hook.

Args:
body (dict): Attributes for the newly created hook,

See: https://auth0.com/docs/api/v2#!/Hooks/post_hooks

delete(id: str) Any[source]

Deletes a hook.

Args:

id (str): The id of the hook to delete.

See: https://auth0.com/docs/api/management/v2#!/Hooks/delete_hooks_by_id

delete_secrets(id: str, body: list[str]) Any[source]

Delete one or more existing secrets for an existing hook.

Args:

id (str): The id of the hook to add secrets to.

body (list): List of secret names to delete.

See: https://auth0.com/docs/api/management/v2#!/Hooks/delete_secrets

get(id: str, fields: list[str] | None = None) dict[str, Any][source]

Retrieves a hook by its ID.

Args:

id (str): The id of the hook to retrieve.

fields (list, optional): A list of fields to include or exclude

(depending on include_fields) from the result, empty to retrieve all fields.

See: https://auth0.com/docs/api/management/v2#!/Hooks/get_hooks_by_id

get_secrets(id: str) dict[str, Any][source]

Retrieves a hook’s secrets.

Args:

id (str): The id of the hook to retrieve secrets from.

See: https://auth0.com/docs/api/management/v2#!/Hooks/get_secrets

update(id: str, body: dict[str, Any]) dict[str, Any][source]

Updates an existing hook.

Args:

id (str): The id of the hook to modify.

body (dict): Attributes to modify.

See: https://auth0.com/docs/api/v2#!/Hooks/patch_hooks_by_id

update_secrets(id: str, body: dict[str, Any]) dict[str, Any][source]

Update one or more existing secrets for an existing hook.

Args:

id (str): The id of the hook to add secrets to.

body (dict): Dict of key-value pairs where the value must be a string.

See: https://auth0.com/docs/api/management/v2#!/Hooks/patch_secrets

management.jobs module

class auth0.management.jobs.Jobs(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 jobs endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

export_users(body: dict[str, Any])[source]

Export all users to a file using a long running job.

Check job status with get(). URL pointing to the export file will be included in the status once the job is complete.

Args:

body (dict): The details of the export users request.

See: https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports

get(id: str) dict[str, Any][source]

Retrieves a job. Useful to check its status.

Args:

id (str): The id of the job.

See: https://auth0.com/docs/api/management/v2#!/Jobs/get_jobs_by_id

get_failed_job(id: str) dict[str, Any][source]

Get failed job error details.

Args:

id (str): The id of the job.

See: https://auth0.com/docs/api/management/v2#!/Jobs/get_errors

import_users(connection_id: str, file_obj: Any, upsert: bool = False, send_completion_email: bool = True, external_id: str | None = None) dict[str, Any][source]

Imports users to a connection from a file.

Args:
connection_id (str): The connection id of the connection to which

users will be inserted.

file_obj (file): A file-like object to upload. The format for

this file is explained in: https://auth0.com/docs/bulk-import.

upsert (bool, optional): When set to False, pre-existing users that match on email address, user ID, or username

will fail. When set to True, pre-existing users that match on any of these fields will be updated, but only with upsertable attributes. Defaults to False. For a list of user profile fields that can be upserted during import, see the following article https://auth0.com/docs/users/references/user-profile-structure#user-profile-attributes.

send_completion_email (bool, optional): When set to True, an email will be sent to notify the completion of this job.

When set to False, no email will be sent. Defaults to True.

external_id (str, optional): Customer-defined ID.

See: https://auth0.com/docs/api/management/v2#!/Jobs/post_users_imports

send_verification_email(body: dict[str, Any]) dict[str, Any][source]

Send verification email.

Send an email to the specified user that asks them to click a link to verify their email address.

Args:

body (dict): Details of verification email request.

See: https://auth0.com/docs/api/v2#!/Jobs/post_verification_email

management.log_streams module

class auth0.management.log_streams.LogStreams(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 log streams endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

create(body: dict[str, Any]) dict[str, Any][source]

Creates a new log stream.

Args:

body (dict): the attributes for the role to create.

See: https://auth0.com/docs/api/management/v2/#!/Log_Streams/post_log_streams

delete(id: str) dict[str, Any][source]

Delete a log stream.

Args:

id (str): The id of the log ste to delete.

See: https://auth0.com/docs/api/management/v2/#!/Log_Streams/delete_log_streams_by_id

get(id: str) dict[str, Any][source]

Retrieves the data related to the log stream entry identified by id.

Args:

id (str): The id of the log stream to retrieve.

See: https://auth0.com/docs/api/management/v2/#!/Log_Streams/get_log_streams_by_id

list() list[dict[str, Any]][source]

Search log events.

Args: See: https://auth0.com/docs/api/management/v2/#!/Log_Streams/get_log_streams

update(id: str, body: dict[str, Any]) dict[str, Any][source]

Update a log stream with the attributes passed in ‘body’

Args:

id (str): The id of the log stream to update.

body (dict): the attributes to update on the log stream.

See: https://auth0.com/docs/api/management/v2/#!/Log_Streams/patch_log_streams_by_id

management.logs module

class auth0.management.logs.Logs(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 logs endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

get(id: str) dict[str, Any][source]

Retrieves the data related to the log entry identified by id.

Args:

id (str): The log_id of the log to retrieve.

See: https://auth0.com/docs/api/management/v2#!/Logs/get_logs_by_id

search(page: int = 0, per_page: int = 50, sort: str | None = None, q: str | None = None, include_totals: bool = True, fields: list[str] | None = None, from_param: str | None = None, take: int | None = None, include_fields: bool = True)[source]

Search log events.

Args:
page (int, optional): The result’s page number (zero based). By default,

retrieves the first page of results.

per_page (int, optional): The amount of entries per page. By default,

retrieves 50 results per page.

sort (str, optional): The field to use for sorting.

1 == ascending and -1 == descending. (e.g: date:1) When not set, the default value is up to the server.

q (str, optional): Query in Lucene query string syntax.

fields (list of str, optional): A list of fields to include or

exclude from the result (depending on include_fields). Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to True.

from_param (str, optional): Log Event Id to start retrieving logs. You can

limit the amount of logs using the take parameter.

take (int, optional): The total amount of entries to retrieve when

using the from parameter. When not set, the default value is up to the server.

See: https://auth0.com/docs/api/management/v2#!/Logs/get_logs

management.organizations module

class auth0.management.organizations.Organizations(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 organizations endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

all_organization_connections(id: str, page: int | None = None, per_page: int | None = None) list[dict[str, Any]][source]

Retrieves a list of all the organization connections.

Args:

id (str): the ID of the organization.

page (int): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

See: https://auth0.com/docs/api/management/v2#!/Organizations/get_enabled_connections

all_organization_invitations(id: str, page: int | None = None, per_page: int | None = None, include_totals: bool = False)[source]

Retrieves a list of all the organization invitations.

Args:

id (str): the ID of the organization.

page (int): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to False. NOTE: returns start and limit, total count is not yet supported

See: https://auth0.com/docs/api/management/v2#!/Organizations/get_invitations

all_organization_member_roles(id: str, user_id: str, page: int | None = None, per_page: int | None = None) list[dict[str, Any]][source]

Retrieves a list of all the roles from the given organization member.

Args:

id (str): the ID of the organization.

user_id (str): the ID of the user member of the organization.

page (int): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

See: https://auth0.com/docs/api/management/v2#!/Organizations/get_organization_member_roles

all_organization_members(id: str, page: int | None = None, per_page: int | None = None, include_totals: bool = True, from_param: str | None = None, take: int | None = None)[source]

Retrieves a list of all the organization members.

Args:

id (str): the ID of the organization.

page (int): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to True.

from_param (str, optional): Checkpoint Id from which to begin retrieving results.

You can limit the number of entries using the take parameter.

take (int, optional): The total amount of entries to retrieve when

using the from parameter. When not set, the default value is up to the server.

See: https://auth0.com/docs/api/management/v2#!/Organizations/get_members

all_organizations(page: int | None = None, per_page: int | None = None, include_totals: bool = True, from_param: str | None = None, take: int | None = None)[source]

Retrieves a list of all the organizations.

Args:
page (int): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to True.

from_param (str, optional): Checkpoint Id from which to begin retrieving results.

You can limit the number of entries using the take parameter.

take (int, optional): The total amount of entries to retrieve when

using the from parameter. When not set, the default value is up to the server.

See: https://auth0.com/docs/api/management/v2#!/Organizations/get_organizations

create_organization(body: dict[str, Any]) dict[str, Any][source]

Create a new organization.

Args:

body (dict): Attributes for the new organization.

See: https://auth0.com/docs/api/management/v2#!/Organizations/post_organizations

create_organization_connection(id: str, body: dict[str, Any]) dict[str, Any][source]

Adds a connection to an organization.

Args:

id (str): the ID of the organization.

body (dict): Attributes for the connection to add.

See: https://auth0.com/docs/api/management/v2#!/Organizations/post_enabled_connections

create_organization_invitation(id: str, body: dict[str, Any]) dict[str, Any][source]

Create an invitation to an organization.

Args:

id (str): the ID of the organization.

body (dict): Attributes for the invitation to create.

See: https://auth0.com/docs/api/management/v2#!/Organizations/post_invitations

create_organization_member_roles(id: str, user_id: str, body: dict[str, Any]) dict[str, Any][source]

Adds roles to a member of an organization.

Args:

id (str): the ID of the organization.

user_id (str): the ID of the user member of the organization.

body (dict): Attributes from the members to add.

See: https://auth0.com/docs/api/management/v2#!/Organizations/post_organization_member_roles

create_organization_members(id: str, body: dict[str, Any]) dict[str, Any][source]

Adds members to an organization.

Args:

id (str): the ID of the organization.

body (dict): Attributes from the members to add.

See: https://auth0.com/docs/api/management/v2#!/Organizations/post_members

delete_organization(id: str) Any[source]

Deletes an organization and all its related assets.

Args:

id (str): Id of organization to delete.

See: https://auth0.com/docs/api/management/v2#!/Organizations/delete_organizations_by_id

delete_organization_connection(id: str, connection_id: str) Any[source]

Deletes a connection from the given organization.

Args:

id (str): Id of organization.

connection_id (str): the ID of the connection to delete.

See: https://auth0.com/docs/api/management/v2#!/Organizations/delete_enabled_connections_by_connectionId

delete_organization_invitation(id: str, invitation_id: str) Any[source]

Deletes an invitation from the given organization.

Args:

id (str): Id of organization.

invitation_id (str): the ID of the invitation to delete.

See: https://auth0.com/docs/api/management/v2#!/Organizations/delete_invitations_by_invitation_id

delete_organization_member_roles(id: str, user_id: str, body: dict[str, Any]) Any[source]

Deletes roles from a member of an organization.

Args:

id (str): Id of organization.

user_id (str): the ID of the user member of the organization.

body (dict): Attributes from the members to delete

See: https://auth0.com/docs/api/management/v2#!/Organizations/delete_organization_member_roles

delete_organization_members(id: str, body: dict[str, Any]) Any[source]

Deletes members from the given organization.

Args:

id (str): Id of organization.

body (dict): Attributes from the members to delete

See: https://auth0.com/docs/api/management/v2#!/Organizations/delete_members

get_organization(id: str) dict[str, Any][source]

Retrieves an organization by its ID.

Args:

id (str): Id of organization to retrieve.

See: https://auth0.com/docs/api/management/v2#!/Organizations/get_organizations_by_id

get_organization_by_name(name: str | None = None) dict[str, Any][source]

Retrieves an organization given its name.

Args:

name (str): The name of the organization to retrieve.

See: https://auth0.com/docs/api/management/v2#!/Organizations/get_name_by_name

get_organization_connection(id: str, connection_id: str) dict[str, Any][source]

Retrieves an organization connection by its ID.

Args:

id (str): the ID of the organization.

connection_id (str): the ID of the connection.

See: https://auth0.com/docs/api/management/v2#!/Organizations/get_enabled_connections_by_connectionId

get_organization_invitation(id: str, invitaton_id: str) dict[str, Any][source]

Retrieves an organization invitation by its ID.

Args:

id (str): the ID of the organization.

invitaton_id (str): the ID of the invitation.

See: https://auth0.com/docs/api/management/v2#!/Organizations/get_invitations_by_invitation_id

update_organization(id: str, body: dict[str, Any]) dict[str, Any][source]

Modifies an organization.

Args:

id (str): the ID of the organization.

body (dict): Attributes to modify.

See: https://auth0.com/docs/api/management/v2#!/Organizations/patch_organizations_by_id

update_organization_connection(id: str, connection_id: str, body: dict[str, Any]) dict[str, Any][source]

Modifies an organization.

Args:

id (str): the ID of the organization.

connection_id (str): the ID of the connection to update.

body (dict): Attributes to modify.

See: https://auth0.com/docs/api/management/v2#!/Organizations/patch_enabled_connections_by_connectionId

management.prompts module

class auth0.management.prompts.Prompts(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 prompts endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

get() dict[str, Any][source]

Retrieves prompts settings.

See: https://auth0.com/docs/api/management/v2#!/Prompts/get_prompts

get_custom_text(prompt: str, language: str)[source]

Retrieves custom text for a prompt in a specific language.

Args:

prompt (str): Name of the prompt.

language (str): Language to update.

See: https://auth0.com/docs/api/management/v2#!/Prompts/get_custom_text_by_language

update(body: dict[str, Any]) dict[str, Any][source]

Updates prompts settings.

See: https://auth0.com/docs/api/management/v2#!/Prompts/patch_prompts

update_custom_text(prompt: str, language: str, body: dict[str, Any]) dict[str, Any][source]

Updates custom text for a prompt in a specific language.

Args:

prompt (str): Name of the prompt.

language (str): Language to update.

body (dict): An object containing custom dictionaries for a group of screens.

See: https://auth0.com/docs/api/management/v2#!/Prompts/put_custom_text_by_language

management.resource_servers module

class auth0.management.resource_servers.ResourceServers(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 resource servers endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

create(body: dict[str, Any]) dict[str, Any][source]

Create a new resource server.

Args:

body (dict): Attributes for the new resource Server.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/post_resource_servers

delete(id: str) Any[source]

Deletes a resource server.

Args:

id (str): Id of resource server to delete.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/delete_resource_servers_by_id

get(id: str) dict[str, Any][source]

Retrieves a resource server by its id.

Args:

id (str): id of the resource server to get.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/get_resource_servers_by_id

get_all(page: int | None = None, per_page: int | None = None, include_totals: bool = False)[source]

Retrieves all resource servers

Args:
page (int, optional): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to False.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/get_resource_servers

update(id: str, body: dict[str, Any]) dict[str, Any][source]

Modifies a resource server.

Args:

id (str): The id of the resource server to update.

body (dict): Attributes to modify.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/patch_resource_servers_by_id

management.roles module

class auth0.management.roles.Roles(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 roles endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

add_permissions(id: str, permissions: List[str]) dict[str, Any][source]

Associates permissions with a role.

Args:

id (str): The role’s id.

permissions (list of str): A list of permission ids to associate to the role.

See https://auth0.com/docs/api/management/v2#!/Roles/post_role_permission_assignment

add_users(id: str, users: List[str]) dict[str, Any][source]

Assign users to a role.

Args:

id (str): The role’s id.

users (list of str): A list of users ids to add to this role.

See https://auth0.com/docs/api/management/v2#!/Roles/post_role_users

create(body: dict[str, Any]) dict[str, Any][source]

Creates a new role.

Args:

body (dict): the attributes for the role to create.

See: https://auth0.com/docs/api/v2#!/Roles/post_roles

delete(id: str) Any[source]

Delete a role.

Args:

id (str): The id of the role to delete.

See: https://auth0.com/docs/api/management/v2#!/Roles/delete_roles_by_id

get(id: str) dict[str, Any][source]

Get a role.

Args:

id (str): The id of the role to retrieve.

See: https://auth0.com/docs/api/management/v2#!/Roles/get_roles_by_id

list(page: int = 0, per_page: int = 25, include_totals: bool = True, name_filter: str | None = None)[source]

List or search roles.

Args:
page (int, optional): The result’s page number (zero based). By default,

retrieves the first page of results.

per_page (int, optional): The amount of entries per page. By default,

retrieves 25 results per page.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to True.

name_filter (str, optional): A case-insensitive filter to apply

to search for roles by name.

See: https://auth0.com/docs/api/management/v2#!/Roles/get_roles

list_permissions(id: str, page: int = 0, per_page: int = 25, include_totals: bool = True)[source]

List the permissions associated to a role.

Args:

id (str): The role’s id.

page (int, optional): The result’s page number (zero based). By default,

retrieves the first page of results.

per_page (int, optional): The amount of entries per page. By default,

retrieves 25 results per page.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to True.

See https://auth0.com/docs/api/management/v2#!/Roles/get_role_permission

list_users(id: str, page: int = 0, per_page: int = 25, include_totals: bool = True, from_param: str | None = None, take: int | None = None)[source]

List the users that have been associated with a given role.

Args:

id (str): The role’s id.

page (int, optional): The result’s page number (zero based). By default,

retrieves the first page of results.

per_page (int, optional): The amount of entries per page. By default,

retrieves 25 results per page.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to True.

from_param (str, optional): Checkpoint Id from which to begin retrieving results.

You can limit the number of entries using the take parameter.

take (int, optional): The total amount of entries to retrieve when

using the from parameter. When not set, the default value is up to the server.

See https://auth0.com/docs/api/management/v2#!/Roles/get_role_user

remove_permissions(id: str, permissions: List[str]) Any[source]

Unassociates permissions from a role.

Args:

id (str): The role’s id.

permissions (list of str): A list of permission ids to unassociate from the role.

See https://auth0.com/docs/api/management/v2#!/Roles/delete_role_permission_assignment

update(id: str, body: dict[str, Any]) dict[str, Any][source]

Update a role with the attributes passed in ‘body’

Args:

id (str): The id of the role to update.

body (dict): the attributes to update on the role.

See: https://auth0.com/docs/api/management/v2#!/Roles/patch_roles_by_id

management.rules_configs module

class auth0.management.rules_configs.RulesConfigs(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

RulesConfig endpoint implementation.

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

all() list[dict[str, Any]][source]

Lists the config variable keys for rules.

See: https://auth0.com/docs/api/management/v2#!/Rules_Configs/get_rules_configs

set(key: str, value: str) dict[str, Any][source]

Sets the rules config for a given key.

Args:

key (str): rules config key to set.

value (str): value to set for the rules config key.

See: https://auth0.com/docs/api/management/v2#!/Rules_Configs/put_rules_configs_by_key

unset(key: str) Any[source]

Removes the rules config for a given key.

Args:

key (str): rules config key to remove.

See: https://auth0.com/docs/api/management/v2#!/Rules_Configs/delete_rules_configs_by_key

management.rules module

class auth0.management.rules.Rules(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Rules endpoint implementation.

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

all(stage: str = 'login_success', enabled: bool = True, fields: list[str] | None = None, include_fields: bool = True, page: int | None = None, per_page: int | None = None, include_totals: bool = False)[source]

Retrieves a list of all rules.

Args:
stage (str, optional): Retrieves rules that match the execution stage.

Defaults to login_success.

enabled (bool, optional): If provided, retrieves rules that match

the value, otherwise all rules are retrieved.

fields (list, optional): A list of fields to include or exclude

(depending on include_fields) from the result. Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

page (int, optional): The result’s page number (zero based). When not set,

the default value is up to the server.

per_page (int, optional): The amount of entries per page. When not set,

the default value is up to the server.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to False.

See: https://auth0.com/docs/api/management/v2#!/Rules/get_rules

create(body: dict[str, Any]) dict[str, Any][source]

Creates a new rule.

Args:

body (dict): Attributes for the newly created rule.

See: https://auth0.com/docs/api/v2#!/Rules/post_rules

delete(id: str) Any[source]

Delete a rule.

Args:

id (str): The id of the rule to delete.

See: https://auth0.com/docs/api/management/v2#!/Rules/delete_rules_by_id

get(id: str, fields: list[str] | None = None, include_fields: bool = True) dict[str, Any][source]

Retrieves a rule by its ID.

Args:

id (str): The id of the rule to retrieve.

fields (list, optional): A list of fields to include or exclude

(depending on include_fields) from the result. Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

See: https://auth0.com/docs/api/management/v2#!/Rules/get_rules_by_id

update(id: str, body: dict[str, Any]) dict[str, Any][source]

Update an existing rule

Args:

id (str): The id of the rule to modify.

body (dict): Attributes to modify.

See: https://auth0.com/docs/api/v2#!/Rules/patch_rules_by_id

management.stats module

class auth0.management.stats.Stats(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 stats endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

active_users() int[source]

Gets the active users count (logged in during the last 30 days).

Returns: An integer.

See: https://auth0.com/docs/api/management/v2#!/Stats/get_active_users

daily_stats(from_date: str | None = None, to_date: str | None = None) list[dict[str, Any]][source]

Gets the daily stats for a particular period.

Args:
from_date (str, optional): The first day of the period (inclusive) in

YYYYMMDD format.

to_date (str, optional): The last day of the period (inclusive) in

YYYYMMDD format.

See: https://auth0.com/docs/api/management/v2#!/Stats/get_daily

management.tenants module

class auth0.management.tenants.Tenants(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 tenants endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

get(fields: list[str] | None = None, include_fields: bool = True) dict[str, Any][source]

Get tenant settings.

Args:
fields (list of str, optional): A list of fields to include or

exclude from the result (depending on include_fields). Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

See: https://auth0.com/docs/api/management/v2#!/Tenants/get_settings

update(body: dict[str, Any]) dict[str, Any][source]

Update tenant settings.

Args:

body (dict): the attributes to update in the tenant.

See: https://auth0.com/docs/api/v2#!/Tenants/patch_settings

management.tickets module

class auth0.management.tickets.Tickets(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 tickets endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

create_email_verification(body: dict[str, Any]) dict[str, Any][source]

Create an email verification ticket.

Args:

body (dict): attributes to set on the email verification request.

See: https://auth0.com/docs/api/v2#!/Tickets/post_email_verification

create_pswd_change(body: dict[str, Any]) dict[str, Any][source]

Create password change ticket.

Args:

body (dict): attributes to set on the password change request.

See: https://auth0.com/docs/api/v2#!/Tickets/post_password_change

management.user_blocks module

class auth0.management.user_blocks.UserBlocks(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 user blocks endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

get(id: str) dict[str, Any][source]

Get a user’s blocks

Args:

id (str): The user_id of the user to retrieve.

See: https://auth0.com/docs/api/management/v2#!/User_Blocks/get_user_blocks_by_id

get_by_identifier(identifier: str) dict[str, Any][source]

Gets blocks by identifier

Args:

identifier (str): Should be any of: username, phone_number, email.

See: https://auth0.com/docs/api/management/v2#!/User_Blocks/get_user_blocks

unblock(id: str) Any[source]

Unblock a user

Args:

id (str): The user_id of the user to update.

See: https://auth0.com/docs/api/management/v2#!/User_Blocks/delete_user_blocks_by_id

unblock_by_identifier(identifier: dict[str, Any]) Any[source]

Unblocks by identifier

Args:

identifier (str): Should be any of: username, phone_number, email.

See: https://auth0.com/docs/api/management/v2#!/User_Blocks/delete_user_blocks

management.users_by_email module

class auth0.management.users_by_email.UsersByEmail(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 users by email endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

search_users_by_email(email: str, fields: list[str] | None = None, include_fields: bool = True) list[dict[str, Any]][source]

List or search users.

Args:

email: Email to search.

fields (list of str, optional): A list of fields to include or

exclude from the result (depending on include_fields). Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be include in the result, False otherwise.

See: https://auth0.com/docs/api/management/v2#!/Users_By_Email/get_users_by_email

management.users module

class auth0.management.users.Users(domain: str, token: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = 'https', rest_options: RestClientOptions | None = None)[source]

Bases: object

Auth0 users endpoints

Args:

domain (str): Your Auth0 domain, e.g: ‘username.auth0.com’

token (str): Management API v2 Token

telemetry (bool, optional): Enable or disable Telemetry

(defaults to True)

timeout (float or tuple, optional): Change the requests

connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)

protocol (str, optional): Protocol to use when making requests.

(defaults to “https”)

rest_options (RestClientOptions): Pass an instance of

RestClientOptions to configure additional RestClient options, such as rate-limit retries. (defaults to None)

add_permissions(id: str, permissions: List[str]) dict[str, Any][source]

Assign permissions to a user.

Args:

id (str): The user’s id.

permissions (list of str): A list of permission ids to associated with the user.

See https://auth0.com/docs/api/management/v2#!/Users/post_permissions

add_roles(id: str, roles: List[str]) dict[str, Any][source]

Associate an array of roles with a user.

Args:

id (str): The user’s id.

roles (list of str): A list of roles ids to associated with the user.

See https://auth0.com/docs/api/management/v2#!/Users/post_user_roles

create(body: dict[str, Any]) dict[str, Any][source]

Creates a new user.

Args:

body (dict): the attributes to set on the user to create.

See: https://auth0.com/docs/api/v2#!/Users/post_users

create_authentication_method(user_id: str, body: dict[str, Any]) dict[str, Any][source]

Creates an authentication method for a given user.

Args:

user_id (str): The user_id to create an authentication method for a given user. body (dict): the request body to create an authentication method for a given user.

See: https://auth0.com/docs/api/management/v2#!/Users/post_authentication_methods

delete(id: str) Any[source]

Delete a user.

Args:

id (str): The user_id of the user to delete.

See: https://auth0.com/docs/api/management/v2#!/Users/delete_users_by_id

delete_authentication_method_by_id(user_id: str, authentication_method_id: str) Any[source]

Deletes an authentication method by ID.

Args:

user_id (str): The user_id to delete an authentication method by ID for. authentication_method_id (str): The authentication_method_id to delete an authentication method by ID for.

See: https://auth0.com/docs/api/management/v2#!/Users/delete_authentication_methods_by_authentication_method_id

delete_authentication_methods(user_id: str) Any[source]

Deletes all authentication methods for the given user.

Args:

user_id (str): The user_id to delete all authentication methods for the given user for.

See: https://auth0.com/docs/api/management/v2#!/Users/delete_authentication_methods

delete_authenticators(id: str) Any[source]

Delete a user’s MFA enrollments.

Args:

id (str): The user’s id.

See: https://auth0.com/docs/api/management/v2#!/Users/delete_authenticators

delete_multifactor(id: str, provider: str) Any[source]

Delete a user’s multifactor provider.

Args:

id (str): The user’s id.

provider (str): The multifactor provider. Supported values ‘duo’

or ‘google-authenticator’.

See: https://auth0.com/docs/api/management/v2#!/Users/delete_multifactor_by_provider

get(id: str, fields: List[str] | None = None, include_fields: bool = True) dict[str, Any][source]

Get a user.

Args:

id (str): The user_id of the user to retrieve.

fields (list of str, optional): A list of fields to include or

exclude from the result (depending on include_fields). Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be included in the result, False otherwise. Defaults to True.

See: https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id

get_authentication_method_by_id(user_id: str, authentication_method_id: str) dict[str, Any][source]

Gets an authentication method by ID.

Args:

user_id (str): The user_id to get an authentication method by ID for. authentication_method_id (str): The authentication_method_id to get an authentication method by ID for.

See: https://auth0.com/docs/api/management/v2#!/Users/get_authentication_methods_by_authentication_method_id

get_authentication_methods(user_id: str) dict[str, Any][source]

Gets a list of authentication methods

Args:

user_id (str): The user_id to get a list of authentication methods for.

See: https://auth0.com/docs/api/management/v2#!/Users/get_authentication_methods

get_guardian_enrollments(user_id: str) dict[str, Any][source]

Retrieves all Guardian enrollments.

Args:

user_id (str): The user_id of the user to retrieve.

See: https://auth0.com/docs/api/management/v2#!/Users/get_enrollments

get_log_events(user_id: str, page: int = 0, per_page: int = 50, sort: str | None = None, include_totals: bool = False)[source]

Retrieve every log event for a specific user id.

Args:

user_id (str): The user_id of the logs to retrieve.

page (int, optional): The result’s page number (zero based). By default,

retrieves the first page of results.

per_page (int, optional): The amount of entries per page. By default,

retrieves 50 results per page.

sort (str, optional): The field to use for sorting. Use field:order

where order is 1 for ascending and -1 for descending. For example date:-1 When not set, the default value is up to the server.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to False.

See: https://auth0.com/docs/api/management/v2#!/Users/get_logs_by_user

invalidate_remembered_browsers(user_id: str) dict[str, Any][source]

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

Args:

user_id (str): The user_id to invalidate remembered browsers for.

See: https://auth0.com/docs/api/management/v2#!/Users/post_invalidate_remember_browser

Link user accounts.

Links the account specified in the body (secondary account) to the account specified by the id param of the URL (primary account).

Args:
id (str): The user_id of the primary identity where you are linking

the secondary account to.

body (dict): the attributes to send as part of this request.

See: https://auth0.com/docs/api/v2#!/Users/post_identities

list(page: int = 0, per_page: int = 25, sort: str | None = None, connection: str | None = None, q: str | None = None, search_engine: str | None = None, include_totals: bool = True, fields: List[str] | None = None, include_fields: bool = True)[source]

List or search users.

Args:
page (int, optional): The result’s page number (zero based). By default,

retrieves the first page of results.

per_page (int, optional): The amount of entries per page. By default,

retrieves 25 results per page.

sort (str, optional): The field to use for sorting.

1 == ascending and -1 == descending. (e.g: email:1) When not set, the default value is up to the server.

connection (str, optional): Connection filter.

q (str, optional): Query in Lucene query string syntax. Only fields

in app_metadata, user_metadata or the normalized user profile are searchable.

search_engine (str, optional): The version of the search_engine to use

when querying for users. Will default to the latest version available. See: https://auth0.com/docs/users/search.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to True.

fields (list of str, optional): A list of fields to include or

exclude from the result (depending on include_fields). Leave empty to retrieve all fields.

include_fields (bool, optional): True if the fields specified are

to be include in the result, False otherwise. Defaults to True.

See: https://auth0.com/docs/api/management/v2#!/Users/get_users

list_organizations(id: str, page: int = 0, per_page: int = 25, include_totals: bool = True)[source]

List the organizations that the user is member of.

Args:

id (str): The user’s id.

page (int, optional): The result’s page number (zero based). By default,

retrieves the first page of results.

per_page (int, optional): The amount of entries per page. By default,

retrieves 25 results per page.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to True.

See https://auth0.com/docs/api/management/v2#!/Users/get_organizations

list_permissions(id: str, page: int = 0, per_page: int = 25, include_totals: bool = True)[source]

List the permissions associated to the user.

Args:

id (str): The user’s id.

page (int, optional): The result’s page number (zero based). By default,

retrieves the first page of results.

per_page (int, optional): The amount of entries per page. By default,

retrieves 25 results per page.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to True.

See https://auth0.com/docs/api/management/v2#!/Users/get_permissions

list_roles(id: str, page: int = 0, per_page: int = 25, include_totals: bool = True)[source]

List the roles associated with a user.

Args:

id (str): The user’s id.

page (int, optional): The result’s page number (zero based). By default,

retrieves the first page of results.

per_page (int, optional): The amount of entries per page. By default,

retrieves 25 results per page.

include_totals (bool, optional): True if the query summary is

to be included in the result, False otherwise. Defaults to True.

See https://auth0.com/docs/api/management/v2#!/Users/get_user_roles

regenerate_recovery_code(user_id: str) dict[str, Any][source]

Removes the current recovery token, generates and returns a new one

Args:

user_id (str): The user_id of the user identity.

See: https://auth0.com/docs/api/management/v2#!/Users/post_recovery_code_regeneration

remove_permissions(id: str, permissions: List[str]) Any[source]

Removes permissions from a user.

Args:

id (str): The user’s id.

permissions (list of str): A list of permission ids to unassociate from the user.

See https://auth0.com/docs/api/management/v2#!/Users/delete_permissions

remove_roles(id: str, roles: List[str]) Any[source]

Removes an array of roles from a user.

Args:

id (str): The user’s id.

roles (list of str): A list of roles ids to unassociate from the user.

See https://auth0.com/docs/api/management/v2#!/Users/delete_user_roles

Unlink a user account

Args:

id (str): The user_id of the user identity.

provider (str): The type of identity provider (e.g: facebook).

user_id (str): The unique identifier for the user for the identity.

See: https://auth0.com/docs/api/management/v2#!/Users/delete_user_identity_by_user_id

update(id: str, body: dict[str, Any]) dict[str, Any][source]

Update a user with the attributes passed in ‘body’

Args:

id (str): The user_id of the user to update.

body (dict): The attributes of the user to update.

See: https://auth0.com/docs/api/v2#!/Users/patch_users_by_id

update_authentication_method_by_id(user_id: str, authentication_method_id: str, body: dict[str, Any]) dict[str, Any][source]

Updates an authentication method.

Args:

user_id (str): The user_id to update an authentication method. authentication_method_id (str): The authentication_method_id to update an authentication method for. body (dict): the request body to update an authentication method.

See: https://auth0.com/docs/api/management/v2#!/Users/patch_authentication_methods_by_authentication_method_id

update_authentication_methods(user_id: str, body: dict[str, Any]) dict[str, Any][source]

Updates all authentication methods for a user by replacing them with the given ones.

Args:

user_id (str): The user_id to update all authentication methods for. body (dict): the request body to update all authentication methods with.

See: https://auth0.com/docs/api/management/v2#!/Users/put_authentication_methods