Should "Browse Users" permission allow me to list all users in a group using the REST API? If not, what permission do I need?

Abraham Sultan May 21, 2015

I'm trying to use the REST API to list all users from a group and if I'm logged in as an administrator I can use this endpoint and it lists the info that I want:

/rest/api/2/group?groupname=my-group-name&expand=users

However if I try to use this endpoint as a user that only has the "Browse Users" permission I get an authorization error:

{"errorMessages":["You are not authorized to perform this action. Administrator privileges are required."],"errors":{}}

Based on the documentation it seems like that permission should be all that I need but I must be missing something:

Browse Users

Ability to select a user or group from a popup window as well as the ability to use the 'share' issues feature. Users with this permission will also be able to see names of all users and groups in the system.

 

My question is: Should I be using a different endpoint to list this information? Is the only way to list this info giving administrator access to the rest API user ? Any other ideas I can try?

 

Thanks in advanced,

Abe

4 answers

1 accepted

1 vote
Answer accepted
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2015

I'm not sure if there are any other options, but in the documentation, that function is listed as requiring admin privileges:

https://developer.atlassian.com/static/connect/docs/latest/scopes/jira-rest-scopes.html#restapiversiongroup

0 votes
Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 21, 2015

You are probably looking for https://docs.atlassian.com/jira/REST/latest/#d2e160 :

/rest/api/2/groupuserpicker

Returns a list of users and groups matching query with highlighting.

Abraham Sultan May 21, 2015

Hi Matheus, thanks for your help. Unfortunately that endpoint is not what I'm looking for unless I'm not understanding how to use it well. What I need to do is to be able to retrieve all the users from a particular group. The endpoint that you suggested seems useful to find all the users or a group that match a specified query. Did I miss something?

Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 21, 2015

Sorry, what I wanted to say is that that is (one of) the API that checks the Browse User permission: "Ability to select a user or group from a popup window as well as the ability to use the 'share' issues feature." That is the API to select a user or group :)

0 votes
Abraham Sultan May 21, 2015

Thanks guys. 

0 votes
cgauterio
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 21, 2015

Hi Abe,

Actually, that error message is correct. Viewing all the users that are members of a given group is an administrative task, so only users with administrative permissions can perform this action.

I hope this helps.

Cheers,

Clarissa.

Suggest an answer

Log in or Sign up to answer