Hello everybody,
As it is written in the JIRA rest api documentation, the following script should retrieve all the instance JIRA users:
def result = get("/rest/api/3/users/")
.header("Accept", "application/json")
.asJson();
To get it working, the documention says that the runner should have JIRA global permission "Browse users and groups" granted. The group in which the user belongs is jira-administrator, which has this permission.
However, when I run the script, I got a 403 error. If I add the "public" group to the "Browse user and groups" permission, it works fine. If a run the script as the scriptrunner addon user, I also get a 403.
I do not know if it is a JIRA/Scriptrunner integration problem , or just a JIRA rest api bug, so I submit this request to you hoping that someone can tell me more about this.
Thanks,
Cédric