Forums

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

Getting all of the users in Jira v10+ through the API

Erazem Kos
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!
July 2, 2025

Hi, I want to get all of the users using the Jira Data Center through the rest API for an integration I am developing. I saw that Jira 10 has this limitation. This lead me to trying the following - 1. get all application roles, 2. get the one that has the key "jira-software" and 3. get all of the members of child groups. Will this get all of the users of the Jira DC? Will this key always remain the same, regardless of the language Jira is in or something, or can it be edited?

1 answer

0 votes
Carlos Garcia Navarro
Community Champion
July 2, 2025

Hi @Erazem Kos ,

The limitation that you pointed out includes a workaround as well. Would that work for your use case?

Workaround

  1. Use Username Filters to Fetch Subsets of Users
    By applying filters to the username parameter, you can retrieve smaller subsets of users and manually aggregate the results. For example:
    https://{baseurl}/rest/api/2/user/search?username=a*&startAt=0&maxResults=100
    
  2. Query the Jira Database Directly
    If direct access to the Jira database is available, the customer can query the cwd_user table to retrieve all users. Example query:
    SELECT user_name, display_name, email_address
    FROM cwd_user
    WHERE active = 1
    ORDER BY user_name ASC
    LIMIT 100 OFFSET 0;
    
Erazem Kos
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!
July 3, 2025

No I will not have direct access to the database, so that is out of the question for my use case. The subsets approach is very tough as I don't know how many total users there will be. So for example querying with "a" could match more than 100 users, and then I need to produce sub-queries and deduplicate etc.

Will my proposed solution not get all of the users?

Like John Funk likes this
Evgenii
Community Champion
July 3, 2025

Hi, @Erazem Kos 

You don't need to perform any deduplication.

When you have more than 100 users, you'll need to use pagination. Simply retrieve and parse the user list page by page until you've fetched all results.

Like # people like this
Erazem Kos
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!
July 3, 2025

But that pagination is not working for Jira 10. It gets truncated to 100 users - talking about the v2 user/search API that I linked to in the original post. 

Like John Funk likes this
Evgenii
Community Champion
July 3, 2025

I don't have installed 10+ Jira for tests. Can you write structure of  response here?
Of course without user data arrays.
Just JSON structure

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer