I am trying to write a code that changes the username and the user quilfied name but all the fields I found were read-only, any help?
1 Answer
If you want to change the username for the existing sitecore users, there is no direct way to do that programmatically. Neither the user manager nor the API of Sitecore provides a way to rename a User, the only possibility would be to create a new user and set the same roles on it.
The only option would be to do change directly in the database, although I wouldn't recommend to do it, similar to how it is described Can username be updated in Sitecore? or https://www.netzkern.de/de-de/blog/changing-usernames-sitecore