-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Component/s: Identity Integration - User Search
-
1
-
Minor
Issue Summary
The GET all users /rest/api/3/users/search endpoint is not returning all the parameters shown in the response tab of the documentation
If you look at the right side of the page, it shows an example response like below:
[
{
"accountId": "5b10a2844c20165700ede21g",
"accountType": "atlassian",
"active": false,
"avatarUrls": {
"16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
"24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
"32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
"48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
},
"displayName": "Mia Krystof",
"key": "",
"name": "",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
},
{
"accountId": "5b10ac8d82e05b22cc7d4ef5",
"accountType": "atlassian",
"active": false,
"avatarUrls": {
"16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=16&s=16",
"24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=24&s=24",
"32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=32&s=32",
"48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=48&s=48"
},
"displayName": "Emma Richards",
"key": "",
"name": "",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10ac8d82e05b22cc7d4ef5"
}
]
However, when examining the documentation's left side under the Response tab, specifically within the array<User> section, it mentions a groups field that supposedly lists all the groups a user belongs to.
This discrepancy raises concerns about whether the absence of the groups field in the actual response is intentional (as part of the expected behaviour) or indicative of a bug, given its mention in the documentation but absence in the response.
This situation can be confusing as it either suggests a potential oversight in the documentation or an undeclared limitation in the API's response.
Steps to Reproduce
- Do a cURL request for this endpoint like the following:
curl --request GET \ --url 'https://your-domain.atlassian.net/rest/api/3/users/search' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
- Check the response being returned and observe that it does not include groups a certain user belongs to.
Expected Results
The group field should be returned if it's currently documented that it's part of the Response
Actual Results
No group field is being returned in the response.
Workaround
As a temporary solution, you can do an additional GET request to the /rest/api/3/user endpoint, specifying the user's accountId to retrieve the complete set of user attributes including groups it belongs to.
The endpoint https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-user-groups-get is another option that could work.
- relates to
-
GORD-200 Loading...