auth0.users.updateAppMetadata() in action

Ready to post? :mag: First, try searching for your answer.

Hi Team,

I am looking on alternative for auth0.users.updateAppMetadata(user.user_id, appMetadata) and auth0.users.updateUserMetadatda(user.user_id, userMetadata). Is this still available in auth0 action.

This is something i am using for linking users in rules.

Can u pls help me, how to handle this in auth0 action!

Thanks,

Hey there @ganesh.kumaresan !

In Actions you can use the api object to both set userMetadata and appMetadata:

1 Like

Thanks Tyf,

I understand that we could update/add field in app/user metadata. But I believe auth0.users.updateAppMetadata() replace user’s entire meta data. Is there any possible way to replace the entire meta data in auth0 actions which auth0.users.updateAppMetadata() do in rules!

1 Like

Gotcha, thanks for clarifying!

There isn’t a way to delete/replace metadata in that way using the api object in Actions - You’ll want to instead use the Management API in your Action for additional functionality:

1 Like

Thank you @tyf for the clear explanation on this!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.