Jira REST API: How to get all inactive users

How can I get all inactive users with the JIRA REST API?

The /rest/api/2/user call requires a user name rather than letting an empty user name result in all the users.

The /rest/api/2/user/search also requires a username. Does this accept a regex like .* or something similar to specify all users?

How can I get all the users?

1 answer

It doesn't appear the API supports just a query for all, at least, not directly as it doesn't support a regex value.

The 'username' parameter does search the email address. If all accounts are within your company, then all emails should have the same domain, which a search on that would return everyone. You could also just use ".com", and repeat for all the ones existing in your instance.

If this isn't an option, you could use the Group endpoint if all the users are assigned groups when added into Bitbucket.

Thanks for the suggestion. The search seems to only look at the email up to the @. I searched for com and the only return was 1 user that happened to have com in his name. It did not search the domain.

This was an excellent suggestion but it doesn't seem to work.

That is odd. Having just "com" works for me in my instance.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Mission-critical battery manufacturer fulfills FAA software requirements with Commit Policy Plugin

EaglePicher Technologies is a leading manufacturer of battery systems for diverse industries like defense, aviation, space or medical. As they operate in highly regulated industries, keeping a clear ...

182 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