We're trying to automate some of our company wide processes regarding account management.
For that reason, I wanted to integrate the migration endpoint to fetch the atlassianId for specific users.
When I execute the request, I get a response with the ID on some users but not on others. While I get the ID correctly like for e.g. Max (email: max@company.com):
{ "username": "max", "accountId": "12345:0a913b9f-1d91-402a-8d52-665a9712345" }For some other users (e.g. john@company.com), I get:
{ "username": "john", "accountId": "unknown" }All of our users have a similar structure in regards to their email. As there is no dedicated "username" field on a user object, I assume the username is always the email prefix (e.g. max@company.com => user/bulk/migration?username=max).
However, for some users I can fetch the id, for others I can try what I want and just get this "unknown"... I see the users I'm asking for in the users/search response. See, that they have an atlassianId and the correct email configured...
What could be the reason here for this behavior? At least it's not random, but deterministic in the sense of "for user x, it always returns the id while for user y it never does..