Cannot change user type with replaceUser

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”.

When running the following:

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?

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