How to get all users in jira using rest api

Hello Everyone !!

I want the list of all user in JIRA account (online) using rest api or want to search user based on email address.

I am trying to get this using below url but this is retuning empty  "[0]" values

https://testjira.atlassian.net/rest/api/2/user/search?username=sonika.jain@test.com

Please suggest

 

3 answers

Hi Sonika,

I am not sure if you can get all users from JIRA rest api, but surely you can search user by username, email id or text from below query

If you are running this directory in browser then make sure you are logged in to JIRA before running this.

You will get Empty value also if there is no user with that email id or name.

I have tested using CURL and running in browser both are working

curl -u testjira:testjira https://testjira.atlassian.net/rest/api/2/user/search?username=sonika.jain@test.com

Taha

0 votes

Hi, Sonica.

About getting all the users, this should give you some information:

https://answers.atlassian.com/questions/140370

Kind regards,
Jaime Kirch da Silveira
Atlassian Cloud Support

Hi,
It is possible to get the list all users (may be with in the limit of maximum returnable results). We need to use the search API.
https://servername/rest/api/2/user/search?username=%


The wildcard character to be used for this purpose is "%".

https://servername/rest/api/2/user/search?username=%

or 

https://servername/rest/api/2/user/assignable/multiProjectSearch?projectKeys=KEY1,KEY2,KEY3

 

Both requests give me active users only. How about all users?

what if users are more than 1000 ?Is it working if startAt=1000 and maxResults=2000?

It's not working for me.

Try ...username=.   (dot)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

45 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you