# How can we modify the role and App\_metadata of user

**URL:** <https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [June 21, 2023, 7:51am UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650 "2023-06-21T07:51:53Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivani](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@shivani](https://community.auth0.com/u/shivani)\
**Post date:** [June 21, 2023, 7:51am UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/1 "2023-06-21T07:51:53Z")

</div>

I need to modify the role and app\_metadata for existing users in auth0. Please help me , how this can be achived .

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 21, 2023, 10:40am UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/3 "2023-06-21T10:40:57Z")

</div>

Hey there!

There are a few ways to approach it.

1. You can go to Auth0 Dashboard → User Management → Users → User Profile you want to update the app\_metadata for

After you click on the user and scroll down there will be a metadata section within which you will be able to make adjustments.

1. Using our Management API endpoint here:

> **[Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id)**

---

<div class="post-metadata">

**Author:** ![shivani](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@shivani](https://community.auth0.com/u/shivani)\
**Post date:** [June 21, 2023, 10:47am UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/4 "2023-06-21T10:47:58Z")

</div>

Hi @konrad.sopala thanks for your response i need to do this bulk amount of user , not for single, any specfic document for that ?

---

<div class="post-metadata">

**Author:** ![shivani](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@shivani](https://community.auth0.com/u/shivani)\
**Post date:** [June 21, 2023, 10:51am UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/5 "2023-06-21T10:51:20Z")

</div>

Also i need to do for update role for users not just app\_metadata

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 21, 2023, 10:58am UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/6 "2023-06-21T10:58:08Z")

</div>

Here’s how to do that:

> [@How to Bulk Update User Profile Details in the Management API?](https://community.auth0.com/t/how-to-bulk-update-user-profile-details-in-the-management-api/81198):
>
> Problem statement: Bulk update user profile details such as user\_metadata and profile\_metadata using the Auth0 Management API and Postman. Solution: We can bulk import users details with Upsert mode turned on to update user details. This article explains the user import schema and the fields that can be bulk imported Steps: Bulk export user details in JSON format using this extension: [User Import / Export Extension](https://auth0.com/docs/extensions/user-import-export-extension) Make changes to the export file. Import the users with the extension or…

---

<div class="post-metadata">

**Author:** ![shivani](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@shivani](https://community.auth0.com/u/shivani)\
**Post date:** [June 23, 2023, 7:42am UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/7 "2023-06-23T07:42:21Z")

</div>

Hi @konrad.sopala this method only update the app\_metadata for the exisiting user in auth0 portal. What about updating the user role for all the existing user in auth0?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 23, 2023, 11:54am UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/8 "2023-06-23T11:54:44Z")

</div>

Sorry here’s how to do it:

[https://community.auth0.com/t/how-to-bulk-add-role-to-multiple-users/90621](https://community.auth0.com/t/how-to-bulk-add-role-to-multiple-users/90621)

---

<div class="post-metadata">

**Author:** ![shivani](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@shivani](https://community.auth0.com/u/shivani)\
**Post date:** [June 23, 2023, 12:04pm UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/9 "2023-06-23T12:04:24Z")

</div>

Hi @konrad.sopala It say to pass mutiple users ids in post request, then where we need to pass in role for the users . can you provide all the step needed for this one. My use case quite simple, i need to update exsiting bulk user role which help of postman, the link you provided say to pass mutiple userid, thats fine, but where we need to pass role for the users ?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 23, 2023, 12:32pm UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/10 "2023-06-23T12:32:08Z")

</div>

Here (in the endpoint):

`/api/v2/roles/{id}/users 23`

you specify role and in the body script you specify user IDs for the users that the role need to be set for.

---

<div class="post-metadata">

**Author:** ![shivani](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@shivani](https://community.auth0.com/u/shivani)\
**Post date:** [June 23, 2023, 1:05pm UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/11 "2023-06-23T13:05:23Z")

</div>

> [@konrad.sopala](#):
>
> /api/v2/roles/{id}/users

Thanks it worked for me 🙂

---

<div class="post-metadata">

**Author:** ![shivani](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@shivani](https://community.auth0.com/u/shivani)\
**Post date:** [July 5, 2023, 9:22am UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/12 "2023-07-05T09:22:31Z")

</div>

@konrad.sopala How can get the roles of all users using some export tool or postman to see the role assigned to user ?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 19, 2023, 9:22am UTC](https://community.auth0.com/t/how-can-we-modify-the-role-and-app-metadata-of-user/109650/13 "2023-07-19T09:22:36Z")

</div>

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