Get jira users with groups

Hello everyone, i need to fetch jira users including groups. In Get all users it says this endpoint can return users with their groups, but unfortunately i wasn’t able to get it work

Hi @JalelAbbassi ,

You might want to use the Get Jira Users API if you want to extract the users along with their groups. Include the groups property in your expand for the query. Hope this helps.

Cheers!!!

1 Like

Hi @ShubhamTyagi ,
thank you for your help, can you give me an example :sweat_smile: :sweat_smile:

Hi @JalelAbbassi ,

Your request might look something like this,

curl --request GET \
  --url 'https://your-domain.atlassian.net/rest/api/3/user/search?query=&expand=groups' \
  --user 'email@example.com:<api_token>' \
  --header 'Accept: application/json'

If this does not return groups along with users, you might have to iterate through user IDs to retrieve their respective groups. Get groups by user

Cheers!!!

2 Likes