Auth0 Home Blog Docs

Management API replace app metadata instead of merge



I need to replace my app meta data (I store permissions there) instead of just merging them. Whats the best way to achieve that?


A quick test showed that a PATCH request to https://{{tenant}}{{id}} with a body of { "app_metadata": null } removed the existing app_metadata of a user.


So I have to do first a patch request with null and than my body? Thanks for your help! I think a PUT request would be very nice to have!


Yes, I could have been more complete in my initial answer; if you want to completely replace the metadata and you don’t know the exact set of properties that already exist then doing the two-step approach would be an option.


Thanks very much for your help!