user/bulk/migration can't handle dot in the username

Paweł Niewolak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 3, 2023

Hi,

We've got Microsoft Logic App automation that in some steps is looking for the "accountId" of a specified user based on the excel spreadsheet. In the past, it used GET /rest/api/3/user to query for a specified user, but there was the issue if the username wasn't correct, the JSON output contained several other random users, and the automation, later on, uses transitions with invalid data. I found that we can use GET /rest/api/3/user/bulk/migration instead to ask for the "accountId", and in case of a misspelled username in the excel spreadsheet it will return "accountId": "unknown" which can be handled as an exception and skip the automation task reporting occurred issue.
Unfortunately, GET /rest/api/3/user/bulk/migration works fine for usernames in the format of name + letter of last name (example: John Smith, username: "johns") but since 2021 new employees get different, and only one format which is name.lastname (for example this would be "john.smith"). Somehow the dot (.) in between the names can't be handled by GET /rest/api/3/user/bulk/migration as for a valid user which has an existing account in Jira it returns "accountId": "unknown".

I tried using quotation marks and slashes but this doesn't allow me to search for the accountId of the user with a dot in the username. Can I ask for any advice, as I didn't find any solution using google, developer.atlassian.com, and even ChatGPT?

1 answer

0 votes
Paweł Niewolak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 7, 2023

So far no answers and walkaround has been invented that excluded the need for the use of the /bulk/migration.

Sjoquist, Carl
Contributor
December 12, 2023

This sounds like a serious problem.  This API is the only one I can find that will return the user's account ID based on the user's email address (username in cloud).   Are there any alternatives that people are aware of?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events