Forums

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

How to pull all jira users account Ids (only for a particular domain) using REST api

aagnihotri March 14, 2023

Hi,

I am trying to pull all JIRA users account Ids using REST api.

I used this api

image.png

it returns all the users including external users(customers) as well

 

image.png

 

but i only care about the internal users who have email address with domain @solifi.com

image.png

 

Is there a way to pass filter for @solifi.com on email address in the api call or is there any other api endpoint which could return  the internal users only. 

 

Can anyone help me out regarding this ?

1 answer

1 accepted

1 vote
Answer accepted
Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2023

"Is there a way to pass filter for @solifi.com on email address in the api call"

Yep. Use the v3 REST API Find Users endpoint instead.

aagnihotri March 14, 2023

@Sunny Ape Thanks for the reply. I looked into the documentation and it says that we can pass query parameter for email address. Since i want to pull the data for all email addresses ending a @solifi.com so i used query parameter like this 

image.png

But you can see it returned only 5 records . But it should return approx 500 records because we have almost 500 internal users using @solifi.com domain. 

Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 15, 2023

You don't seem to have read the documentation properly. You can't use JQL operators like '~' in the query string nor can you put the word 'emailAddress' in the query string either.

Also, can I assume you remember that the ability to search for a user based on their email addresses in Jira Cloud only works if a user has allowed you to find them that way? Your search probably only found a couple of users who have disabled the privacy setting which keeps their email address private.

Why don't you just search for ALL USERS, then just ignore any results that aren't users in your domain?

Like aagnihotri likes this
aagnihotri March 15, 2023

Thanks @Sunny Ape . Got it now :) 

Suggest an answer

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

Atlassian Community Events