Hello all,
I have an automation which sends the web request
/rest/api/2/user/search?query={{issue.customfield_12345.urlEncode}}
where {{issue.customfield.12345.urlEncode}} is an email address field. This works perfectly fine when using a testing account with a full access API token and returns results exactly as intended. I want to use a Atlassian Service account where API keys must be created with scopes, however I cannot get this API call to work when using an Atlassian Service account with the scopes listed in the Atlassian REST API documentation:
Permissions required: Browse users and groups global permission
Anonymous calls or calls by users without the required permission return empty search results.
Scopes
OAuth 2.0 scopes required:
Classic RECOMMENDED:read:jira-user
Granular:read:user:jira
,read:user.property:jira
,read:application-role:jira
,read:avatar:jira
,read:group:jira
I have confirmed that:
Unfortunately it simply doesn't return any results, which suggests that the permissions are somehow not correct.
If I change the only the Authorization header to use the known working test account API key, it works fine and returns results, but when I change it to the Service account key, it fails. I've even tried other permutations of scopes and app access but nothing appears to work.
Any ideas greatly appreciated!