Response (with Run as Current user):
Serializing object into ‘interface java.util.Map’
GET /rest/api/2/users/search asObject Request Duration: 1255ms
GET request to /rest/api/2/users/search returned an error code: status: 403 - Forbidden
body: {errorMessages=[error.no-permission], errors={}}
Welcome to the Atlassian Developer Community, @Pakiet!
If you get an HTTP 403 for this API, it is possible that your user does not have the Browse users and groups global permission. You can verify this by going to > System > Security > Global Permissions – it looks like this:
Not all requests are authorised as the ScriptRunner app user, different features allow you to select the user a script runs as, run it as yourself, or run a script as a user who initiated some action that caused a script to run.
Thanks for correcting the documentation link, @jbevan.
Apologies, @Pakiet, I overlooked an important detail for Get all users API; unfortunately, this resource cannot be accessed from a Connect app and I do not have a workaround.