# Assign role to multiple users in Postman Results on 403

**URL:** <https://community.auth0.com/t/assign-role-to-multiple-users-in-postman-results-on-403/126757>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [February 7, 2024, 2:57pm UTC](https://community.auth0.com/t/assign-role-to-multiple-users-in-postman-results-on-403/126757 "2024-02-07T14:57:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruni-WanKenobi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bruni-wankenobi/32/50643_2.png) [@Bruni-WanKenobi](https://community.auth0.com/u/Bruni-WanKenobi)\
**Post date:** [February 7, 2024, 2:57pm UTC](https://community.auth0.com/t/assign-role-to-multiple-users-in-postman-results-on-403/126757/1 "2024-02-07T14:57:53Z")

</div>

Hey Fam,

I am trying to assign a new role to all existing users. We have a couple of thousand of users. I tried the approach shared here [How to Bulk Add Role to Multiple Users](https://community.auth0.com/t/how-to-bulk-add-role-to-multiple-users/90621) by lihua.zhang.

However, I am receiving a 403 stating when attempting the suggested steps inside of Postman.

```auto
{
    "statusCode": 403,
    "error": "Forbidden",
    "message": "Insufficient scope, expected any of: update:roles,create:role_members",
    "errorCode": "insufficient_scope"
}

```

- I am using the management API so I should have update:roles,create:role\_members

- I also tried creating a specific API with these permissions.

```auto
POST 
URL https://domain.us.auth0.com/api/v2/roles/ROLE_ID/users
Body: {
    "users": [
        "auth0|USER_ID_ONE",
        "auth0|USER_ID_TWO"
    ]
}

```

I retrieved a list of users from the Get Users and I am planning on referencing this list inside the user’s array.

Any idea what is causing the 403 and how I can go about adding the role for my users?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 7, 2024, 10:57pm UTC](https://community.auth0.com/t/assign-role-to-multiple-users-in-postman-results-on-403/126757/3 "2024-02-07T22:57:19Z")

</div>

Hello there @Bruni-WanKenobi welcome to the community!

> [@Bruni-WanKenobi](#):
>
> I am using the management API so I should have update:roles,create:role\_members

This error is typically spot on in that the [management API access token](https://auth0.com/docs/secure/tokens/access-tokens/management-api-access-tokens) you are using against the API doesn’t have the required scopes - You can inspect the token you are attempting to use at [jwt.io](http://jwt.io) to be sure.

---

<div class="post-metadata">

**Author:** ![Bruni-WanKenobi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bruni-wankenobi/32/50643_2.png) [@Bruni-WanKenobi](https://community.auth0.com/u/Bruni-WanKenobi)\
**Post date:** [February 8, 2024, 2:39pm UTC](https://community.auth0.com/t/assign-role-to-multiple-users-in-postman-results-on-403/126757/4 "2024-02-08T14:39:15Z")

</div>

Thank you @ty.frith I am copying the token directly from the API Management Test tab under the Asking Auth0 for tokens from my application.

When I inspect the token this is what I got.

```auto
{
  "iss": "https://domain.us.auth0.com/",
  "sub": "DVTvP55555wN5555555555@clients",
  "aud": "https://domain.us.auth0.com/api/v2/",
  "iat": sdsdsd,
  "exp": sdsdsds,
  "azp": "sdsdsd",
  "scope": "read:users update:users create:users read:users_app_metadata update:users_app_metadata create:user_tickets read:connections update:connections create:connections update:roles create:role_members",
  "gty": "client-credentials"
}

```

It could be that my Collection in Postman had cached an erroneous bearer token. After I confirmed that the role was there I killed its service and tried again again and I was able to add the new role for a test group of users. Thank you for the help!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 8, 2024, 11:41pm UTC](https://community.auth0.com/t/assign-role-to-multiple-users-in-postman-results-on-403/126757/5 "2024-02-08T23:41:11Z")

</div>

Happy to help, and thanks for sharing your findings here! 🤠

---

<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:** [February 22, 2024, 11:41pm UTC](https://community.auth0.com/t/assign-role-to-multiple-users-in-postman-results-on-403/126757/6 "2024-02-22T23:41:46Z")

</div>

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