OKTA API : Change the primary email and change the login

Hello !

Im using the okta API to edit user profile.
I Use the endpoint : /idp/myaccount/emails/ to add, challenge and veirfy my email.

I put the role to “PRIMARY”

But it’s doesn’t change the login of my user …
Do you know why ? And how to do it please ?

Thanks a lot !

Hello, do you have any clue for this one please ?

The Login/Username and Primary Email are two different attributes, and the MyAccounts endpoint will not affect the username, only the primary email for the user.

Ok thanks !
Do you know how i can change the login then ? When i try to do it through :
/idp/myaccount/profile it tells me :
“errorLink”: “E0000001”,
“errorId”: “oaekb2IJo-8SWyVGjAoWWt79g”,
“errorCauses”: [
“errorSummary”: “Property ‘login’ is read only. The value supplied must exactly match the existing value.”

thank you !

The end user will not be able to change the login value via MyAccount API.

Only an admin would be able to modify this value, and they would need to use /Users to update the user.