Updating user attributes using Okta Rest API

Hi,

I’m trying to update user attributes in Okta using the Okta Rest API. https://developer.okta.com/docs/api/resources/users/

The User configuration in Okta is set to be Workday mastered, which is intended.

When attempting to update an attribute via the rest api, I get the following error

‘Operation failed because user profile is mastered under another system’. How can I update a user attribute in okta that is Workday mastered independently via the Rest API?

Any ideas would be greatly appreciated.

Thanks in advance,
Shiraz

Hi @Shiraz

The error occurs because the attributes that you are trying to modify are mastered by Workday, meaning that Workday is the primary source of truth for your user’s details.

If you would like to overwrite this and be able to modify the attributes from Okta, please goto your Admin interface and navigate to Directory/Users >> Profile Editor >> user >> Profile >> attribute >> information icon and, from the pop-up window, switch “Master priority” from “Inherit from profile master” to “Inherit from Okta”.

Bulls eye! Thanks a lot for the prompt response @dragos . Much appreciated.

Just wondering if it possible to update a user using a different attribute such as the employeeNumber instead of the username.

Thanks,
Shiraz

Hi @Shiraz

Unfortunately no, the /api/v1/users/{endpoint} can accept only user ID or username. If you want to narrow down a user by employee ID, you can use List Users with Search, for example

https://yourOktaOrg.okta.com/api/v1/users?search=profile.employeeNumber%20eq%20"ABC-123"

and then copy the user’s ID and access /api/v1/users/{userId}.

Thanks again for your clarifications, Dragos.