The End of Life (EOL) date of Rules and Hooks will be November 18, 2026, and they are no longer available to new tenants created as of October 16, 2023. Existing tenants with active Hooks will retain Hooks product access through end of life.We highly recommend that you use Actions to extend Auth0. With Actions, you have access to rich type information, inline documentation, and public
npm
packages, and can connect external integrations that enhance your overall extensibility experience. To learn more about what Actions offer, read Understand How Auth0 Actions Work.To help with your migration, we offer guides that will help you migrate from Rules to Actions and migrate from Hooks to Actions. We also have a dedicated Move to Actions page that highlights feature comparisons, an Actions demo, and other resources to help you on your migration journey.To read more about the Rules and Hooks deprecation, read our blog post: Preparing for Rules and Hooks End of Life.Read metadata
You can read metadata using rules with the . You can also search for profile-related information inuser_metadata
, such as:
name
nickname
given_name
family_name
name
, nickname
, given_name
, family_name
, or picture
root attributes on the normalized user profile, you must configure your connection sync with Auth0 so that user attributes will be updated from the identity provider only on user profile creation. These root attributes will then be available to be edited individually or by bulk imports
As an example, assume the following metadata is stored for a user with the email address jane.doe@example.com
:
user.app_metadata
is Undefined
by default.
To read the available metadata, you will need to access the correct user property.
Read app metadata
You can make a decision based on the user’s roles:Read user metadata
You can base decisions on specific preferences, such as a color preference:Read application metadata (clientMetadata)
Application metadata (clientMetadata
) is an optional, top-level property of the context
object. Existing applications will have no value for this property.
Update metadata
Use Rules to map SAML attributes that Auth0 receives from the IdP into
user_metadata
or app_metadata
.Update app metadata
To add an administrative role to the user:Update user metadata
To add the user’sfontSize
preference to the user profile:
Update app and user metadata simultaneously
To reduce the rule’s processing time, you may update both theapp_metadata
and user_metadata
in the same rule:
Delete metadata
Delete app metadata properties and values
To delete a property, set the property’s value tonull
.
Delete user’s roles example
To delete the user’s roles, use the following sample rule:Delete single property value example
To delete a single value of a property, remove that specific value. For example, to remove thewriter
role from the user profile:
roles
property still exists but does not contain any value.