Admin API to fetch user details, shows only "self" link?

Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2023

As per https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-orgs-orgid-users-get  we should be able to fetch the details of all the users present in the organization, but when I try to run this API via postman I get the below output : (replaced org_id as variable)

{
    "data": [],
    "links": {
        "self": "https://api.atlassian.com/admin/v1/orgs/{org_id}/users"
    }
}

where as the example in the document states that we should get all the user info along with the details : 

jiar_user_api.png

Tried using the "cursor" query as well, but not sure if I used it rite, and due to lack of examples I may have gone the wrong way some where.


API Used

https://api.atlassian.com/admin/v1/orgs/{org_id}/users
Headers : 
* API key
* Accept: application/json

 

Judging from what I've read, if we can get this detail via the API, we should be able to extract the last active information needed.

1 answer

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2023

Hi @Jehan Bhathena and welcome to the community

I've tried this endpoint and I'm getting results without any problem. Can you verify that you have claimed the managed accounts?

Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2023

Hello @Alex Koxaras _Relational_ 

Thank you for verifying the API :-)
please can you elaborate on "claimed the managed accounts", not aware of this concept yet.

For this screen, I'll have to link a domain (as of now I don't own any domains) : image.png


Just to confirm, If I don't verify the domains I wont be able to fetch the below users via API then? 
image.png

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2023

Exactly!

This API retrieves the managed accounts from your verified domain. When I ran the endpoint, the payload had only my managed accounts from my verified domain. All the other users which are within my instance were not inside this payload.

This endpoint

GET /rest/api/2/users/search

will get you all the users in your instance, but not the managed accounts. However, you will also get the app users :)

You know that you can export users from the UI, right?

export userss.png

 

export usersss.png

Within this exported csv you will see corresponding columns about then that user was active in the respective product:

exported csv.png

 

Let me know if that helps!

Like Jehan Bhathena likes this
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2023

Got it, so if I dont claim any domain, then I cannot fetch the users via the admin api.

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-users-search-get I tried this API too, but this one doesn't have the Last Active info that the Admin api has.

I'll explore the export CSV option more to see if I can make that of more use.

Thank you for all the information @Alex Koxaras _Relational_ , will post back here if I find anything else.

Suggest an answer

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

Atlassian Community Events