Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get accountId for users doesnot work through Postman

LILANIS
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!
October 29, 2024

Hi,

I'm trying to fetch the accountId for users as I need them for one of my APIs. We are populating the asset information from a source system into Jira and hence the need for accountId.

Trying to use the GET 

 

/rest/api/2/user/bulk/migration for this but that didn't work. I get a 200 ok response but don't get the accountId for the users even though the users are present in the system.

Let me know if there is any other way to fetch the accountId parameter?

1 answer

0 votes
Jehan Bhathena
Community Champion
October 29, 2024

Hi @LILANIS 

Can you share a snippet of the Api of how you've configured it in Postman?

As per rhe documentation the API takes either username or key, can u share what you've selected?

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-user-bulk-migration-get

Since you're trying to fetch the Account ID, you can try the Get All Users api https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-users-get instead, much simpler and will help fetch the complete list too.

LILANIS
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!
October 29, 2024

Hi,

I'm using the below where organization is my organization name,

https://organization.atlassian.net/rest/api/2/user/bulk/migration?startAt=0&maxResults=10&username=LILANIS

This gives me 200 ok, but does not return the accountid

Response:

[
    {
        "username": "LILANIS",
        "accountId": "unknown"
    }
]
Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 29, 2024

Does the problem happen for all users or only some users?

When you used the Get User endpoint, did it return accountId for the affected users?

If you have Managed Users (and might have an external user directory system in use), were you able to get the accountId via the Search for Users in an Organization endpoint via the Cloud Admin APIs?

Like Jehan Bhathena likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events