Is there a normal way to get all group members via REST API in Jira Cloud?

As the subject says. We would like to offer admins an option to subscribe a Jira/Confluence group to a regular email from within Jira/Confluence. Given that Atlassian does not offer email service from within REST API, we need to get all group members and their emails.

This is the current state of API:

GET /rest/api/3/group/member Returns a paginated list of all users in a group.
Permissions required: Administer Jira global permission.
Connect app scope required: ADMIN

GET /wiki/rest/api/group/member Returns the users that are members of a group.
Permissions required: Permission to access the Confluence site (‘Can use’ global permission). Connect app scope required: READ

So in Confluence we could do it easily. In Jira, however, we would have to get all users list, and then for each user ask if it is member of this group, as those endpoints are accessible with READ scope. So we can get the same result with lesser privileges, as we don’t ask for ADMIN scope for our app.
Is there a better way? Or do I need to file a bug so that group members endpoint scope is changed?

To be honest, I would just use ADMIN scope. Nobody cares.

1 Like