Filter out portal-only customers - rest/api/2/user/search

Hello,

The following API returns a list of all users, including portal-only customers:

/rest/api/2/user/search/

I’m wondering if there is any way to filter out those service desk users? They appear in our dropdown and we would like to avoid it.

I will appreciate your guidance.

1 Like

Edit: Ignore this response. As Fabien pointed out I did not see that this question was for Jira Server and this response is for Jira Cloud. :melting_face:

Cloud-only: In the response to the rest/api/2/user/search there should be a parameter for each account called “accountType”. Portal-only accounts will have that value set to “customer”, while Atlassian accounts will be “atlassian”. So you should be able to filter by that value once you have the list.

I think you talk in about this doc ? /rest/api/2/users/search because the question concern jira server and the API that you talk concern Cloud :slightly_smiling_face:

Get All Users - Jira DC Documentation

2 Likes