# Cannot change user type with replaceUser

**URL:** <https://devforum.okta.com/t/cannot-change-user-type-with-replaceuser/32942>\
**Category:** API\
**Tags:** java\
**Created:** [April 17, 2025, 6:02pm UTC](https://devforum.okta.com/t/cannot-change-user-type-with-replaceuser/32942 "2025-04-17T18:02:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cqq](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@cqq](https://devforum.okta.com/u/cqq)\
**Post date:** [April 17, 2025, 6:02pm UTC](https://devforum.okta.com/t/cannot-change-user-type-with-replaceuser/32942/1 "2025-04-17T18:02:47Z")

</div>

Hello, I am attempting to change the user’s type id from one profile to another as part of a migration.

In the notes section it says to perform this action requires a “full PUT replacement”.

> **[Users](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/User/#tag/User/operation/updateUser)**
>
> The Users API provides operations to manage users in your organization.
> \> \*\*Note:\*\* Some of the curl code examples on this page include SSWS API token authentication. However, Okta recommends using scoped OAuth 2.0 and OIDC access tokens to...

When running the following:

```javascript
const myuser = await client.userApi.getUser({ userId: 'hari.seldon@foundation.space' });
myuser.type.id = 'otyjvg8j707QVzddu0h7';
        
const result = await client.userApi.replaceUser({ userId: 'hari.seldon@foundation.space', user: myuser });

```

the user’s type has not changed. Is there something else I need to include for the update to work?

---

<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:** [May 17, 2025, 6:03pm UTC](https://devforum.okta.com/t/cannot-change-user-type-with-replaceuser/32942/2 "2025-05-17T18:03:19Z")

</div>

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