Hi!
We ran into a problem when no user is found in JIRA instance when searching for user using GET /rest/api/2/user/search endpoint in JIRA add on, username is set to user email adress. Endpoint is accessed via JWT authentication, addonParams.http.get() function, addonParams are built as following:
addonParams = {
http: addon.httpClient({
clientKey: clientKey, // the unique client key of the tenant to make a request to
addonKey: addonKey
}),
clientKey: clientKey,
userId: userKey
};
User has global permission to search for users.
To add to the problem, the query returns user correctly on some JIRA instances. On the instance where query does not find the user, Tempo add on is installed. When user is not found, response is still 200 or 201, not a failure.
The same query to GET /rest/api/2/user/search returns the user correctly when query runs from Postman, with Basic Authentication, in the JIRA instance where add on query fails.
Could you please point us in the right direction, what could be the problem when running the query from add on?
Thank you.
Regards,
Irena