CQL field
user field in CQL: syntax and examples (Confluence)
The user field searches for people, not content. It comes in three forms: user for the current user or an account ID, user.fullname for a partial name, and user.accountid for an exact account ID. It belongs to the user search, so run it against that endpoint.
Syntax
user = currentUser()
user = "accountId"
user.fullname ~ "name"
user.accountid = "accountId"
Arguments
| Argument | What it does | Optional |
|---|---|---|
accountId | The full Atlassian account ID of a person, in quotes. It contains a colon, so it must be quoted. | no |
name | Part of the person's full name or public name, whichever you can see. | no |
Works with
- user: = and IN (as documented), with currentUser().
- user.fullname: ~ (as documented).
- user.accountid: = and IN (as documented).
- Not with: >, >=, <, <=. Other operators are documented as unsupported; see the pitfalls for what happens when you try them (checked on Confluence Cloud, November 2026).
Examples
user = currentUser()Look up your own user record, for example to confirm which account a saved query runs as.
Run on Confluence Cloud on .
user.fullname ~ "Joh*"Find people whose name starts with the letters you remember.
Run on Confluence Cloud on .
user.fullname ~ "John"The documentation's example: search people by part of their full name.
Run on Confluence Cloud on .
user.accountid = "99:27935d01-0000-0000-0000-a9b8d3b2ae2e"Look up one person by account ID, the exact route when names are ambiguous. The ID shown is a placeholder.
Run on Confluence Cloud on .
user.accountid in ("99:27935d01-0000-0000-0000-a9b8d3b2ae2e", "48293:5s04-0000-0000-0000-d7a9b9d8c9f01")Resolve two account IDs in one query, for example when you have IDs from an audit export.
Run on Confluence Cloud on .
user.fullname ~ "a" AND user = currentUser()Combine a name filter with the current user. Useful as a check that a name search really includes you.
Run on Confluence Cloud on .
Pitfalls
- The examples on this page are run against the user search (
/wiki/rest/api/search/user), which is where the documentation places this field. On the normal content search the same query still runs, but it returns a result of type user, souser = currentUser() AND type = pagefinds nothing (checked on Confluence Cloud, November 2026). user ~ "name"fails with "Operator is not supported for field 'user'". Partial names go throughuser.fullname. Equality does not work there:user.fullname = "Anna"fails with "Could not parse cql" anduser.fullname in ("Anna")fails with "Supported operators are : ~, !~".- The documentation marks
!=andNOT INon user, and!~on user.fullname, as unsupported. They are accepted without an error, but do not rely on them to exclude someone: in our checkuser != currentUser()still returned the current user. - A name or account ID that does not match anything gives an empty list, not an error. Account IDs must be full values; a fragment of one is not searched.
Questions and answers
How do I search for a person by email in CQL?
The documentation lists only three user forms: user (current user or full account ID), user.fullname and user.accountid. There is no email form, so find the person by name or account ID.