Is there an API to get list of users who are direct members of a Jira group?

akhilesha.saralaya
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 1, 2024

I have a question regrading: getting list of users who are direct members of a Jira group.

Firstly I wanted to clear some things using the below information that I would like to call as scenarios:

  1. Getting the List of Users from a Jira Group: When you get the list of users from a Jira group, you retrieve the direct members of that group. These are the users who are explicitly added to the group through Jira's user management interface or by using the appropriate API calls. The list obtained in this way includes only the users directly assigned to the group.

  2. Getting the Effective List of Users from a Jira Group: The effective list of users from a Jira group includes not only the direct members of the group but also any users who inherit group membership through nested groups or permissions schemes. In other words, it includes both the direct members of the group and any users who are indirectly members of the group due to their membership in other groups or permissions assignments. For example, if Group A contains User 1 directly and Group B, and Group B contains User 2, then the effective list of users for Group A would include both User 1 and User 2.

Currently I am using Get list of users API, but I am "Getting the Effective List of Users from a Jira Group" (Case 2 in the above scenario).

I want a way for "Getting the List of Users from a Jira Group" (Case 1 in the above scenario).

Please let me know if there is a direct API or a filer that I can apply on the above mentioned API.

1 answer

0 votes

You can get the list of Users in a single group from API

Use Get instance id/rest/api/3/group/member?groupId={groupId}

mention Group id and you will get all the list of users in that particular Group.

akhilesha.saralaya
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 2, 2024

Is there a way to get the groupId from the group name?

No. if you are Jira admin if you open the Group in the URL you can see the ID of group

Like akhilesha.saralaya likes this

Suggest an answer

Log in or Sign up to answer