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

**URL:** <https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656>\
**Category:** Everything Else\
**Tags:** gdpr, confluence-cloud, cql\
**Created:** [June 3, 2019, 12:13pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656 "2019-06-03T12:13:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![james.dellow](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/james.dellow/32/35848_2.png) [@james.dellow](https://community.developer.atlassian.com/u/james.dellow)\
**Post date:** [June 3, 2019, 12:13pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/1 "2019-06-03T12:13:45Z")

</div>

I expect this is GDPR related, but does anyone specifically know why I can no longer use the [title field](https://developer.atlassian.com/cloud/confluence/cql-fields/) to limit the number of users returned using CQL and the [search API](https://developer.atlassian.com/cloud/confluence/rest/#api-search-get)?

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?

---

<div class="post-metadata">

**Author:** ![sfg](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@sfg](https://community.developer.atlassian.com/u/sfg)\
**Post date:** [June 3, 2019, 2:49pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/2 "2019-06-03T14:49:15Z")

</div>

@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 ?

---

<div class="post-metadata">

**Author:** ![james.dellow](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/james.dellow/32/35848_2.png) [@james.dellow](https://community.developer.atlassian.com/u/james.dellow)\
**Post date:** [June 3, 2019, 9:50pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/3 "2019-06-03T21:50:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nmansilla](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/nmansilla/32/33772_2.png) [@nmansilla](https://community.developer.atlassian.com/u/nmansilla)\
**Post date:** [June 5, 2019, 12:40pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/4 "2019-06-05T12:40:31Z")

</div>

@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`

---

<div class="post-metadata">

**Author:** ![james.dellow](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/james.dellow/32/35848_2.png) [@james.dellow](https://community.developer.atlassian.com/u/james.dellow)\
**Post date:** [June 5, 2019, 1:51pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/5 "2019-06-05T13:51:31Z")

</div>

> [@nmansilla](#):
>
> /rest/api/search?cql=user.fullname%20~%20%22Neil%22

Thanks - that’s appears to be working.

---

<div class="post-metadata">

**Author:** ![james.dellow](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/james.dellow/32/35848_2.png) [@james.dellow](https://community.developer.atlassian.com/u/james.dellow)\
**Post date:** [June 5, 2019, 2:28pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/6 "2019-06-05T14:28:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sfg](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@sfg](https://community.developer.atlassian.com/u/sfg)\
**Post date:** [June 5, 2019, 3:17pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/7 "2019-06-05T15:17:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nmansilla](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/nmansilla/32/33772_2.png) [@nmansilla](https://community.developer.atlassian.com/u/nmansilla)\
**Post date:** [June 5, 2019, 7:17pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/8 "2019-06-05T19:17:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![james.dellow](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/james.dellow/32/35848_2.png) [@james.dellow](https://community.developer.atlassian.com/u/james.dellow)\
**Post date:** [June 5, 2019, 10:41pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/9 "2019-06-05T22:41:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nmansilla](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/nmansilla/32/33772_2.png) [@nmansilla](https://community.developer.atlassian.com/u/nmansilla)\
**Post date:** [June 5, 2019, 11:22pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/10 "2019-06-05T23:22:48Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![james.dellow](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/james.dellow/32/35848_2.png) [@james.dellow](https://community.developer.atlassian.com/u/james.dellow)\
**Post date:** [June 5, 2019, 11:41pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/11 "2019-06-05T23:41:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sfg](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@sfg](https://community.developer.atlassian.com/u/sfg)\
**Post date:** [October 4, 2019, 5:44pm UTC](https://community.developer.atlassian.com/t/searching-for-users-in-confluence-cloud-using-cql-and-title-field-to-limit-results-no-longer-works/29656/12 "2019-10-04T17:44:32Z")

</div>

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
