The userkey is a JIRA identification created automatically when the user is created in the JIRA instance. This key is created by Jira, not by the user, their admin or Tempo. The key is not related to changes that the user can make to his name in the JIRA instance. The key will remain the same, even if the user's name has been changed. This is done in a way to keep the data associated with the correct user as different users can have the same name (i.e. John Smith).
In the reports, we display the userkey that is generated by JIRA. That's why when the user changes his name, the key remains the same and this is not changeable.
For example, John was first created in Jira with "john" as username and userkey. Then we changed this username to "Taylor". The original userkey will remain as "john" even though, through the UI he is be 's been identified now as Taylor.
Image Modified
For As a workaround, for REST API calls, you can run Jira run Jira REST API to get the user's details with userkey as a work around.