Metadata Type | Field Name | Description |
---|---|---|
User Information | user_metadata | Stores user attributes such as preferences that do not impact a user’s core functionality. This data can be edited by logged in users if you build a form using the Management API and should not be used as a secure data store. |
Access Information | app_metadata | Stores information such as permissions, Auth0 plan, and external IDs that can impact user access to features. This data cannot be edited by users and there are restrictions for what can be stored in this field. |
Application Information | client_metadata in the Client object, context.clientMetadata in Rules, and event.client.metadata in post-login Actions. | Stores information about an application (or client in OIDC OAuth2 terminology). For example, the URL for the application home page (any value that Auth0 doesn’t set in the application settings). |
fetchUserProfile
script of custom social connections, you can create and update metadata using the metadata
object.
post-login
Action that uses custom claims to copy user_metadata
properties to . You can then retrieve users’ user_metadata
through the Get User Info endpoint of the Authentication API.
To learn more, read Manage User Metadata with the post-login Action Trigger.
user_metadata
, or remove an configuration.
Task | Endpoint | Scope |
---|---|---|
View | GET /api/v2/users/ | read:current_user |
Create | PATCH /api/v2/users/ | create:current_user_metadata |
Update | PATCH /api/v2/users/ | update:current_user_metadata |
Delete | DELETE /api/v2/users//multifactor/ | update:users |
user_metadata.
Read user_metadata
properties the same way you would read any other user profile property. For example, the following code snippet retrieves the value associated with user_metadata.hobby
and assigns it to an element on the page:
additionalSignUpFields
to add custom fields to user sign-up forms. When a user adds data in a custom field, Auth0 stores entered values in that user’s user_metadata
. To learn more about adding user_metadata
on signup, read Additional Signup Fields.
/dbconnections/signup
endpoint to set the user_metadata
for a user. To learn more about working with metadata during a custom signup process, read Custom Signup.
When you set the user_metadata
field using the Authentication API /dbconnections/signup
endpoint, you are limited to a maximum of 10 string fields and 500 characters.
user_metadata.lang
if you want the user to be able to change the field’s value, then use the information to customize the language for an email. To learn more, read Customize Email Templates.
If you are having issues with Lock, review Deprecation Errors. If you are having issues with the Management API, review Check API Calls