Different between key and username in Jira API

Hi,

I encounter a problem that my program cannot find the user key.

text: User ‘JIRAUSERXXXXX’ does not exist.

But actually this user does exist and was already added in our project space. (Of course, my agent account is Admin.)

And I can use this user’s username to do some actions but the key is invalid. I have processed a lot of other users in our project space, but they do not have the same problem.

I found that almost key is the lower case of username, but this user’s key is JIRAUSERXXXXX .

Therefore, I would like to know the difference between username and key in Jira.

Thank you.

Regards,

Winni

The user key was a concept introduced in Jira 6 (?). By default it was the same as the original username. When the username was changed - the user key stayed the orginal value. However in Jira 8.1 - Atlassian started to make gdpr changes - see: https://confluence.atlassian.com/jiracore/gdpr-changes-in-jira-975041009.html (8.4 made the user key be in the new format for new users - see https://confluence.atlassian.com/jiracore/preparing-for-jira-8-4-975040967.html)

In Jira 8.7 you can now anonymize the user key: https://confluence.atlassian.com/jiracore/preparing-for-jira-8-7-983794309.html

In short - username and the user key are no longer the same thing… Don’t rely on that behavior.

4 Likes

Got it! Thanks for your explanation in detail.

To confirm… the anonymizer function is the only way to edit the user key (via API), correct?