Perform a mass update on users

Within the metadata of each user, I store some information that is the same for certain groups of users. When I update this in my API, I want to be able to send the emails or user ids of the related users and the information being updated to Auth0 so that it can be updated. Is there a way to do this at any time? From what I’ve researched, there isn’t any method in the Auth0 framework that I can use straight from my API, so I am wondering if there is a way to send an event to Auth0 which can be picked up by a hook but the hooks seem to be tied to certain events like password change or registering. The only other suggestion I saw is using rules, but I’d rather avoid waiting until the user logs in to update their metadata.

Hi!

For updating user metadata from your API backend you would want to utilize the management API.

Hope this helps!

2 Likes

I have seen this, however I wanted to know if there is a good way to bulk edit. It the group of users I need to update contains hundreds or even thousands of users, it would take a long time to go one by one

we do not have a bulk edit feature.

The management API would be the way to update metadata from a backend, however, a large batch of update requests could have a negative impact on your tenant. Not ideal.

You could potentially do this through an action or a rule, updating users as they log in, but this may not be the right solution for you, depending on your requirements.

Auth0 Actions

1 Like

Thanks for helping on this one Marcus!