# Management API - Scope

**URL:** <https://community.auth0.com/t/management-api-scope/109881>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [June 23, 2023, 4:16pm UTC](https://community.auth0.com/t/management-api-scope/109881 "2023-06-23T16:16:37Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![heberr1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@heberr1](https://community.auth0.com/u/heberr1)\
**Post date:** [June 23, 2023, 4:16pm UTC](https://community.auth0.com/t/management-api-scope/109881/1 "2023-06-23T16:16:37Z")

</div>

Hi There,

I’ve almost figured out how the Management API works. However I am running into a few issue when I submit a “User Update” API post. When I’m in the Auth0 Management API pages and make a API post under Test this endpoint" the update occurs just fine. However when I submit API post from my website I get a response of 200, but the user update does not occur. Not sure if I am submitting the scope properly.

I am using postman to test:

URL I’m posting to: {{base\_url}}/users/auth0%7C6494bb02f1ac1401362d9cca

body:

{ “scope”: “update:users”, “email”: “[heberr@msn.com](mailto:heberr@msn.com)”, “given\_name”: “Hebster”, “family\_name”: “Reynolds”, “name”: “Hebster Reynolds” }

Results:

{“[created\_at":“2023-06-22T21:20:02.333Z”,“email”:"heberr@msn.com](mailto:created_at%22:%222023-06-22T21:20:02.333Z%22,%22email%22:%22heberr@msn.com)”,“email\_verified”:true,“identities”:[{“user\_id”:“6494bb02f1ac1401362d9cca”,“connection”:“dhaAuth0”,“provider”:“auth0”,“isSocial”:false}],“name”:“Heber Reynoso”,“nickname”:“heberr”,“picture”:“[https://s.gravatar.com/avatar/a0b569c00dd0c94628510c905b0e725e?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fhe.png",“updated\_at”:“2023-06-23T15:56:10.571Z”,“user\_id”:“auth0|6494bb02f1ac1401362d9cca”,“family\_name”:“Reynoso”,“given\_name”:"Heber](https://s.gravatar.com/avatar/a0b569c00dd0c94628510c905b0e725e?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fhe.png%22,%22updated_at%22:%222023-06-23T15:56:10.571Z%22,%22user_id%22:%22auth0%7C6494bb02f1ac1401362d9cca%22,%22family_name%22:%22Reynoso%22,%22given_name%22:%22Heber)”}

The user data does not change. Is there some sample code on how to submit a scope?

Thanks in advanced for any guidance.

---

<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:** [June 23, 2023, 9:27pm UTC](https://community.auth0.com/t/management-api-scope/109881/3 "2023-06-23T21:27:06Z")

</div>

Hey there @heberr1!

> [@heberr1](#):
>
> However when I submit API post from my website I get a response of 200, but the user update does not occur. Not sure if I am submitting the scope properly.

What exactly are you attempting to update? The `update:users` scope is required by a Management API access token (associated with a m2m app) to update a user - Scopes are not directly associated with users but rather with the applications. The scopes in Auth0 represent the permissions that an application (client) can have.

When you make an authorize request, you request these scopes, and they get included in the access token if the user grants permission. This is part of the OAuth 2.0 framework, which is designed to let applications have limited access to user accounts.

---

<div class="post-metadata">

**Author:** ![heberr1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@heberr1](https://community.auth0.com/u/heberr1)\
**Post date:** [June 23, 2023, 9:59pm UTC](https://community.auth0.com/t/management-api-scope/109881/4 "2023-06-23T21:59:57Z")

</div>

I am trying to update the given\_name, family\_name & name of a user account. I am sending the Bearer token and I certain the update:users scope is allowed. Again right now I am testing with Postman and seem to get a status of 200 but the user account details does not change unless I submit under the Auth0 Management documentation page.

Any other suggestions?

Thank you

---

<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:** [June 23, 2023, 10:16pm UTC](https://community.auth0.com/t/management-api-scope/109881/5 "2023-06-23T22:16:04Z")

</div>

Thanks for clarifying!

I’ve gone through the exact same process and used a body of the following in Postman:

```auto
{
   "family_name": "Test",
    "given_name": "Test",
    "name": "test@gmail.com"
}

```

The user profile is updated and reflect in a GET to `/api/v2/users/user_id` as well as in the user profile in my dashboard.

---

<div class="post-metadata">

**Author:** ![heberr1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@heberr1](https://community.auth0.com/u/heberr1)\
**Post date:** [June 23, 2023, 10:42pm UTC](https://community.auth0.com/t/management-api-scope/109881/6 "2023-06-23T22:42:49Z")

</div>

![postman](https://global.discourse-cdn.com/auth0/original/3X/b/4/b4b2f4ebeb919d37005440a6efc802f30f16ddec.jpeg)

Still will not update the basic details. Do API calls work with a free Auth0 account? Not sure what I am doing wrong.

---

<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:** [June 23, 2023, 11:40pm UTC](https://community.auth0.com/t/management-api-scope/109881/8 "2023-06-23T23:40:40Z")

</div>

Hey @heberr1 thanks for the screenshot!

Do you mind sharing the `PATCH` code from Postman (remove access token)? You can grab it by clicking the `</>` icon in the upper left corner. Here is mine for example:

```auto
curl --location --request PATCH 'https://dev-yxoacp77.us.auth0.com/api/v2/users/auth0|622bc0a00699ee0f0' \
--header 'Authorization: Bearer XXX' \
--header 'Content-Type: application/json' \
--header 'Cookie: did=XXX' \
--data-raw '{
   "family_name": "test",
    "given_name": "test",
    "name": "test@gmail.com"
}'

```

---

<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:** [June 23, 2023, 11:41pm UTC](https://community.auth0.com/t/management-api-scope/109881/9 "2023-06-23T23:41:37Z")

</div>

And just to be sure - You are running this as a `PATCH` prior to the `GET` shown in the screenshot?

---

<div class="post-metadata">

**Author:** ![heberr1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@heberr1](https://community.auth0.com/u/heberr1)\
**Post date:** [June 24, 2023, 11:33pm UTC](https://community.auth0.com/t/management-api-scope/109881/10 "2023-06-24T23:33:55Z")

</div>

I guess I am not using “Patch”.

curl --location --request GET ‘[https://dev-p2gisi3l38iiryqg.us.auth0.com/api/v2/users/auth0|6494bb02f1ac1401362d9cca](https://dev-p2gisi3l38iiryqg.us.auth0.com/api/v2/users/auth0%7C6494bb02f1ac1401362d9cca)’   
–header ‘Content-Type: text/plain’   
–header ‘Authorization: Bearer XXX’   
–data '{ “given\_name”: “Hebster”, “family\_name”: “Reynolds”, “name”: “Hebster Reynolds” }

Would I add “PATCH” as a header variable?

---

<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:** [June 26, 2023, 3:11pm UTC](https://community.auth0.com/t/management-api-scope/109881/11 "2023-06-26T15:11:58Z")

</div>

Hey @heberr1, thanks for confirming! If using Postman, you’ll just need to switch the request to `PATCH` - See screenshot below:

 ![Screenshot 2023-06-26 at 8.11.25 AM](https://global.discourse-cdn.com/auth0/original/3X/2/4/24410e8048595cbcf582f06c8d0ec476d424a29a.png)

---

<div class="post-metadata">

**Author:** ![heberr1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@heberr1](https://community.auth0.com/u/heberr1)\
**Post date:** [June 26, 2023, 3:24pm UTC](https://community.auth0.com/t/management-api-scope/109881/12 "2023-06-26T15:24:55Z")

</div>

That worked, Thank you so much for your 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:** [June 26, 2023, 5:41pm UTC](https://community.auth0.com/t/management-api-scope/109881/13 "2023-06-26T17:41:00Z")

</div>

That’s great news 🚀 Happy to help!

---

<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 10, 2023, 5:41pm UTC](https://community.auth0.com/t/management-api-scope/109881/14 "2023-07-10T17:41:28Z")

</div>

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