Read metadata
You can read metadata using rules with the . You can also search for profile-related information inuser_metadata, such as:
namenicknamegiven_namefamily_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.