We are trying the Cloud Admin API, specifically the Get users in an organization REST API to get the full list of users in an organization like so:
curl --request GET \
--url 'https://api.atlassian.com/admin/v1/orgs/{orgId}/users' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
But when we call the API, we get an empty list of users, even though we have over 900 users.
{
"data": [],
"links": {
"self": "https://api.atlassian.com/admin/v1/orgs/{orgId}/domains"
},
"meta": null
}
Not sure what’s going on, I wonder if anyone else has had the same issue.
1 Like
Welcome to Atlassian’s Developer Community, Manuel!
I confirm your result and it is the expected result. That said, I do see how that’s not clear from the REST API docs. This is clearer if you have gone through the user documentation for Atlassian Access. Specifically, you have an organization where there are no managed users.
You can “claim” users for an organization by verifying an email domain.
2 Likes
Hello ,
We are facing same issue
but we do have users and still receiving empty data array in response
can you help in that
I have added a personal email address to my organization in one product, and there is no way to list that user from API even though it’s there on the UI. This is a security nightmare.
On Jira APIs, that user is available however email is not visible due to privacy settings. But I can see the email of this user in the Organization users page.
This is making user management and audits very hard.
3 Likes
Any insight here?
Getting the same - querying the organization gets result, adding to the same query /users and getting empty list although for sure we have in our organizations many users
@GiladWisney,
Welcome to the Atlassian developer community!
The original post here is over 5 years old and folks who have responded haven’t provided much added context. As such, I’m not clear on what insight you are looking for.
Have you “claimed” users for your organization and enrolled in Atlassian Guard (formally known as Atlassian Access)? If so, are you also provisioning users through a directory service (aka IdP)?
There’s probably a feature requests or bug that needs to be filed here, but I don’t yet understand your expectations vs how the API actually behaves.
Hi, I’ve stumbled across the same problem and found this thread, so sorry to butt in
For me it seems that our expectation is that calling that API would list all of the users within our organisation, especially those that we can see in this page https://admin.atlassian.com/o/<ORGID>/users?status=ACTIVE
(and indeed, you yourself confessed 5 years ago in this thread that the docs don’t suggest that we should expect anything else), whereas if I’m understanding it correctly, the API only returns users if your organisation is enrolled in Atlassian Guard and those users are managed by it. So in my opinion, the feature request would be either for this API to return all users, however they may be provisioned, or for a new API endpoint that can return the same information as this but for users that appear in the Users page of the Directory (and the docs be updated to reflect that). I think that would be a massive help.
Thanks
As with this person, for my use case, if it were possible to get user email from the regular JIRA APIs, I wouldn’t even have come across this problem.