Permissions required:Browse users and groupsglobal permission. Users with permission to access Jira can call this operation, but empty lists are returned.
Make sure the user from whose account you are trying to call this API has browse user and group global permission. To check quickly, you can execute following API in browser (having active logged in session),
https://<base-url>/rest/api/2/mypermissions
Search for ‘USER_PICKER’, you will find following response,
..// other permissions
"USER_PICKER" : {
"id" : "27",
"key" : "USER_PICKER",
"name" : "Browse users and groups",
"type" : "GLOBAL",
"description" : "View and select users or groups from the user picker, and share issues. Users with this permission can see the names of all users and groups on your site.",
"havePermission" : false // check this value, it must be true, otherwise you'll get empty result
}
..// other permissions
I checked and the above permission , on few accounts this was indeed the case , yet there are other accounts where I keep on getting 0 users even though the permission is set.
Any other idea?