Hello, I cannot seem to get this to work properly. I basically went down the rabbit hole on this issue hitting problem after problem till i finally got to this solution: https://community.atlassian.com/t5/Jira-questions/Any-way-to-get-all-users-list-using-JIRA-REST-API/qaq-p/518530
When I try to mimic this, by doing something like:
domain="example"
query=".@${domain}.com"
curl --request GET \
--url "https://${domain}.atlassian.net/rest/api/3/user/search?query=${query}&maxResults=2000" \
--user "${user}:${pass}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
I end up with only a single result returning, even though there are many users that would match this domain name. What am I missing?
Hi @Nick Hatfield and welcome to the community,
What do you mean by domain.com? Cloud domains end with .net.
Your API is this one https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get
Hi thanks for the quick reply and warm welcome :) ...
the query = "." + "@" + "${domain}" + ".com" to represent wildcard@domain.com as a query req for all users with this email match
EDIT:
I just went through the link you provided. There something strange for me as every user has a different accountId. none of them are the same. So providing an accountId at all only shows a single user that it belongs to.
Basically i just want to return a list of all users. Preferably, all users that dont have site access anymore, so i can delete those same users from the api based on the last activity date
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh wait @Alex Koxaras -Relational- I dont know what happened there.. I re-clicked the link you sent and this is exactly what i needed to list all users! Thank you very much!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.