# Update password after login

**URL:** <https://community.auth0.com/t/update-password-after-login/69677>\
**Category:** Get Help\
**Tags:** change-password\
**Created:** [September 15, 2021, 3:05am UTC](https://community.auth0.com/t/update-password-after-login/69677 "2021-09-15T03:05:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev111](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dev111/32/12814_2.png) [@dev111](https://community.auth0.com/u/dev111)\
**Post date:** [September 15, 2021, 3:05am UTC](https://community.auth0.com/t/update-password-after-login/69677/1 "2021-09-15T03:05:05Z")

</div>

Currently, we are looking into implementing the change password feature (change password flow gets invoked for a logged in user).

We are using the below code to update password after login

var options = { method: ‘PATCH’, url: ‘[https://YOUR\_DOMAIN/api/v2/users/USER\_ID](https://your_domain/api/v2/users/USER_ID)’, headers: {‘content-type’: ‘application/json’}, data: {password: ‘NEW\_PASSWORD’, connection: ‘Username-Password-Authentication’} };

But we are getting the below given error

data: { statusCode: 403, error: ‘Forbidden’, message: ‘You cannot update the following fields: password, connection’, errorCode: ‘insufficient\_scope’ }

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [September 15, 2021, 1:36pm UTC](https://community.auth0.com/t/update-password-after-login/69677/3 "2021-09-15T13:36:29Z")

</div>

The access token you are using for the management API doesn’t have the right scope. It needs the update:users scope.

John

---

<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:** [September 30, 2021, 4:36pm UTC](https://community.auth0.com/t/update-password-after-login/69677/4 "2021-09-30T16:36:25Z")

</div>

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