-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
Severity 3 - Minor
Issue Summary
When I use CQL in REST API for searching users endpoint and the user is a guest, the endpoint does not return the data for guests.
When I don’t use CQL in REST API endpoints and user is a guest, the endpoint return data for all users including guests.
Steps to Reproduce
- Request https://{site}/wiki/rest/api/search/user?cql=user in ("{accountId}") with cql query
- See the response - it's empty, like this:
{ 2 "results": [], 3 "start": 0, 4 "limit": 25, 5 "size": 0, 6 "totalSize": 0, 7 "cqlQuery": "user in (\"5e6ab05fae59460cfb01ff8a\")", 8 "searchDuration": 192, 9 "_links": { 10 "base": "https://msztuba-test.atlassian.net/wiki", 11 "context": "/wiki" 12 } 13}
- Request https://{site}/wiki/rest/api/user?accountId={accountId} without cql query
- See the response - it contains data.
{ 2 "type": "known", 3 "accountId": "{accountId}", 4 "accountType": "atlassian", 5 "email": "", 6 "publicName": "", 7 "profilePicture": { 8 "path": "/wiki/aa-avatar/5e6ab05fae59460cfb01ff8a", 9 "width": 48, 10 "height": 48, 11 "isDefault": false 12 }, 13 "displayName": "", 14 "isExternalCollaborator": false, 15 "_expandable": { 16 "operations": "", 17 "personalSpace": "" 18 }, 19 "_links": { 20 "self": "https://{site}/wiki/rest/api/user?accountId=5e6ab05fae59460cfb01ff8a", 21 "base": "https://{site}/wiki", 22 "context": "/wiki" 23 } 24}
Expected Results
Both endpoints (with cql and without) should return the same data.
Actual Results
As above
...
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
c104318e957e 7659915ce41f it looks like we may need to have some documentation updated. Try adding request parameter sitePermissionTypeFilter=externalCollaborator, looks like we have documentation for this parameter on https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search/#api-wiki-rest-api-search-get, but not https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search/#api-wiki-rest-api-search-user-get.
sitePermissionTypeFilter string
Filters users by permission type. Use NONE to default to licensed users, EXTERNALCOLLABORATOR for external/guest users, and ALL to include all permission types.
Default: none
Valid values: all, externalCollaborator, none