# Change user name via api call

**URL:** <https://devforum.okta.com/t/change-user-name-via-api-call/2296>\
**Category:** API\
**Created:** [July 31, 2018, 4:34pm UTC](https://devforum.okta.com/t/change-user-name-via-api-call/2296 "2018-07-31T16:34:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PETER74](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PETER74](https://devforum.okta.com/u/PETER74)\
**Post date:** [July 31, 2018, 4:34pm UTC](https://devforum.okta.com/t/change-user-name-via-api-call/2296/1 "2018-07-31T16:34:50Z")

</div>

Hi  
Is there a rest api call for me to use to change the username of a user?  
Thank you

---

<div class="post-metadata">

**Author:** ![vijet](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/vijet/32/245_2.png) [@vijet](https://devforum.okta.com/u/vijet)\
**Post date:** [July 31, 2018, 7:04pm UTC](https://devforum.okta.com/t/change-user-name-via-api-call/2296/2 "2018-07-31T19:04:03Z")

</div>

Hi @PETER74,

You can use the `Update User` API to update the user’s profile - [https://developer.okta.com/docs/api/resources/users#update-user](https://developer.okta.com/docs/api/resources/users#update-user)

The username of a user is the `profile.login` property of the `profile` object - [https://developer.okta.com/docs/api/resources/users#profile-object](https://developer.okta.com/docs/api/resources/users#profile-object)

You can pass the updated profile object to `Update user` API and it should work.

---

<div class="post-metadata">

**Author:** ![PETER74](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PETER74](https://devforum.okta.com/u/PETER74)\
**Post date:** [July 31, 2018, 7:15pm UTC](https://devforum.okta.com/t/change-user-name-via-api-call/2296/3 "2018-07-31T19:15:24Z")

</div>

got it working ty tho vijet

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 12, 2024, 11:26pm UTC](https://devforum.okta.com/t/change-user-name-via-api-call/2296/4 "2024-01-12T23:26:00Z")

</div>

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