multiProjectSearch API returns no results

I am attempting to use the /rest/api/2/user/assignable/multiProjectSearch API in jira server (version 8.13.4) to return a list of assignable users.

This API returns an empty array of results regardless of what is passed in (i.e. project keys, usernames, etc.). I have checked my user permissions using the /rest/api/2/mypermissions API, and the value for permissions.USER_PICKER.havePermission is true.

Hello @aaron2

Can you please provide the example code of the full request you are submitting, including all query parameters.

Also, please confirm that you have used the Get user endpoint to confirm that:

  1. The username you’re searching for within those projects really does exist
  2. You have sufficient rights / credentials to be able to lookup that username

Hello @sunnyape

Any combination of query parameters does not work. When I send the following:

rest/api/2/user/assignable/multiProjectSearch?maxResults=25&projectKeys=ENG&startAt=0&username=

I get an empty array back, with no username specified I should get all assignable users in the project.

If I pass in an exact username (my own username in this example)

rest/api/2/user/assignable/multiProjectSearch?maxResults=25&projectKeys=ENG&startAt=0&username=svc.hproof.jira

I also get no results back.

I am sure the username exists as it is my own, and even with no username I should get some result set back.

As for your 2nd question, what permission or credential do you suggest that I look for? The only relevant one that I can seem to find for this API is the one that I mentioned previously (USER_PICKER), which I have verified I have at a global level as well as for this particular project.

Sorry @aaron2 , I don’t think I can help any further, as I don’t have access to a Jira Server any more, let alone an old version like 8.13.4. Those requests look properly formed and seem have all the required components.

That v2 REST API endpoint seems to be working just fine with Jira CLOUD, as is the newer v3 endpoint that does the equivalent. Both are finding an assignable user based on multiple project keys.

Given how old that version of Jira Server is you are using, you might want to firstly consider updating to a more recent version. If that still does not resolve the issue, then contact Atlassian directly.

Unfortunately this is for an integration with a jira instance I do not manage. I ruled out the version being the cause however, as I changed my test instances version to 8.13.4 and was still able to fetch users via the v2 REST API. This seems to be due to some kind of configuration issue but I don’t really even have an idea of what configuration I should be checking.

Hi @aaron2 ,

You might want to try Jira Server’s Permission Helper, if you haven’t already, to validate if the said user has browse project or browse user permissions.

Cheers,
Ian

1 Like