Update User Profile is Not Working Inside Verify Custom Database Script - "change_email script does not exist"
Feb 20, 2026
Overview
ManagementClient.users.update does not appear to work correctly inside the verify_email custom database script. The following error is encountered:
Getting issue Error! change_email script does not exist
Troubleshooting
Perform the following checks:
- the 'verify_email' Custom Database script is correctly updating the user's 'email_verified' status (e.g. using the "ManagementClient.users.update" function). For further information, refer to Verify Script Templates
- the 'change_email' Custom Database script is correctly updating the user's email address. For further information, refer to Change Email Script Template
If either of those conditions is false, it is expected that the error "change_email script does not exist" will be thrown.
Applies To
- Update User Profile
- Custom Database Script
Solution
Function of the script
The 'change_email' script is required where it is desirable to update both the user's email address (or email address verification status) in Auth0 and the external database, using a single update operation.Consequently, the 'change_email' script plays a critical role in maintaining the integrity of user records in situations where a Custom Database is employed. This is because Auth0 must update both:
- the email on the external database store
- the profile on the Auth0 side
Reason for the error condition
If a Custom Database connection does not have a 'change_email' script configured, any attempt to update the user's email address will result in the following error report:"change_email script does not exist"
On the other hand, if the script exists but is incorrectly configured, this can also lead to errors. For example, the email address might be updated in the Auth0 user profile but not in the external database, giving rise to inconsistent behaviour.
What might happen in those circumstances is that:
- The user will attempt to log in using the updated email address.
- Auth0 will try to search for the updated address in the external database.
- The user would not be found.