Searching for users in Confluence Cloud using CQL and title field to limit results no longer works

I expect this is GDPR related, but does anyone specifically know why I can no longer use the title field to limit the number of users returned using CQL and the search API?

Previously cql=type=user and title ~ “SEARCH PHRASE” worked, but now it returns all users regardless.

My user picker is unusable in the meantime.

What’s the recommended approach for creating a user picker now?

@james.dellow, We are experiencing the same issue. The API cql=type=user and title ~ "SEARCH TERM* is no longer filtering based on title. Our plugin is highly dependent on this functionality.

Can anyone in the Atlassian team please please look into it ?

I’ve logged a bug in ecosystem (although not sure if that’s the right place for this particular issue) and I’ve also now raised a support ticket.

@james.dellow @sfg - had a chat with the Confluence Cloud team, and apparently there’s some newly available method and CQL params on the cusp of being documented externally. I’ll share them below, and will work with the product team to get these into the docs.

Method: /wiki/rest/api/search/user
cql: user.fullname ~ "search_phrase"

URL encoded, searching your instance for users that contain Neil would look like this:

https://yourinstance.atlassian.net/wiki/rest/api/search?cql=user.fullname%20~%20%22Neil%22

Thanks - that’s appears to be working.

BTW it does appear to be slower than the original method?

Thanks @nmansilla !! The API /rest/api/search?cql=user.fullname%20~%20%22%22 is working.

1 Like

@james.dellow - are you experiencing long query times? How many users on the instance, how many matches, and what is your search operator + query?

On my cloud development instance there are only a couple of real user accounts and some other systems/add-on accounts - so a dozen at most. It is slower than the broken API to pull the full list of users and noticeably slower than when that version was still working. Unfortunately I don’t have access to a suitable instance to test it on a larger set of users.

@james.dellow At the bottom of the payload, there’s a value for searchDuration – I’m seeing fairly fast execution times. On a 5 user developer instance as well as a 1,000+ user instance, I’m seeing sub 250ms execution time, using a variety of query sizes too (even 1 character queries, which you think might take a lot longer). What kind of numbers are you seeing?

For user.fullname “searchDuration”: 58
For the cql=type=user “searchDuration”: 48 (and actually only 8 users, not a dozen)
I guess 10 ms difference shouldn’t be noticeable?

Hello Neil,

Is it possible to return account type in confluence user search API (just like there is one in JIRA user search API). Currently the following API returns accountType as empty for all users (system /app/atlassian)

https:///wiki/rest/api/search?cql=user.fullname%20~%20%22test%22

We need this feature so that we can filter the real user vs plugin user, in order to show relevant result in the user picker control in confluence.

Thanks!!
Sheff