# Find Jira users by name or project with the REST API

URL: https://goingstellar.ro/reference/atlassian-rest-api/user-search/

Find a person with GET /rest/api/3/user/search?query=, list candidates for one project with /user/assignable/search, or page through everyone with /users/search. Single lookups go through GET /rest/api/3/user?accountId=. Usernames and keys are gone: a request that uses username gets a 400.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| GET | `/rest/api/3/user/search` | Finds active users by name, email prefix or accountId. |
| GET | `/rest/api/3/user/assignable/search` | Finds users who can be assigned in a project. |
| GET | `/rest/api/3/users/search` | Lists all users, including inactive and app accounts. |
| GET | `/rest/api/3/user` | Returns one user by accountId. |

## Examples

### GET /rest/api/3/user/search

Searches for automation. The only match is an app account with an empty email address.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'query=automation' \
  --data-urlencode 'maxResults=2' \
  'https://your-domain.atlassian.net/rest/api/3/user/search'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/user/search',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'query': 'automation', 'maxResults': '2'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
[
 {
  "accountType": "app",
  "emailAddress": "",
  "displayName": "Automation for Jira",
  "active": true,
  "guest": false
 }
]
```

Response headers:

```
X-Ratelimit-Limit: 350
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/user/assignable/search

Lists who can be assigned in project WEB.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'project=WEB' \
  --data-urlencode 'maxResults=2' \
  'https://your-domain.atlassian.net/rest/api/3/user/assignable/search'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/user/assignable/search',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'project': 'WEB', 'maxResults': '2'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
[
 {
  "accountType": "atlassian",
  "displayName": "<display name>",
  "active": true,
  "guest": false
 }
]
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/users/search

Lists all users two at a time. The second entry is an app account of appType agent.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'maxResults=2' \
  'https://your-domain.atlassian.net/rest/api/3/users/search'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/users/search',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'maxResults': '2'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
[
 {
  "accountType": "atlassian",
  "displayName": "<display name>",
  "active": true
 },
 {
  "accountType": "app",
  "appType": "agent",
  "displayName": "Blocker Checker",
  "active": true
 }
]
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/user

Reads one user by accountId.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'accountId=<accountId>' \
  'https://your-domain.atlassian.net/rest/api/3/user'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/user',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'accountId': '<accountId>'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "accountType": "atlassian",
 "displayName": "<display name>",
 "active": true,
 "timeZone": "Europe/Bucharest",
 "locale": "en_US"
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/user

Asks for username=admin, the old way. It is refused.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'username=admin' \
  'https://your-domain.atlassian.net/rest/api/3/user'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/user',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'username': 'admin'},
)
print(r.status_code, r.text)
```

Response: HTTP 400

```
{
 "errorMessages": [
  "The 'accountId' query parameter needs to be provided"
 ],
 "errors": {}
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- query=automation matched an account of accountType app with the display name Automation for Jira. Its emailAddress was an empty string.
- /users/search returned an app account with appType agent and no emailAddress key, next to a normal atlassian account.
- GET /user with username=admin answered 400 with "The 'accountId' query parameter needs to be provided".
- The spec says /user/search returns active users and takes startAt and maxResults over a filtered list up to the thousandth user, while /users/search covers active, inactive and deleted accounts.

## Pitfalls

- Pass accountId everywhere. The username and key parameters are listed as no longer available, and the 400 above is what happens.
- Do not rely on emailAddress to identify people. It can be empty or missing depending on the user's privacy settings.
- Count app and agent accounts when you list all users. They have accountType app and may lack an email address.
- The spec notes that user search endpoints share one collective rate limit for the tenant, so avoid calling them in a tight loop.

## Questions and answers

### How do I find the accountId of a teammate?

Call GET /rest/api/3/user/search with query set to a name or email prefix and read accountId from the match.

## Related

- [Users, bulk lookup and groups](https://goingstellar.ro/reference/atlassian-rest-api/user-groups/)
- [The current user](https://goingstellar.ro/reference/atlassian-rest-api/myself-current-user/)
- [Assign a work item](https://goingstellar.ro/reference/atlassian-rest-api/assign-issue/)
- [Rate limits and 429](https://goingstellar.ro/reference/atlassian-rest-api/rate-limits-and-429/)
- [startAt and maxResults](https://goingstellar.ro/reference/atlassian-rest-api/pagination-startat-maxresults/)

## Sources

- [The Jira Cloud platform REST API v3 (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/)
- [Rate limiting, Jira (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/rate-limiting/)
- [Find users (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-get)

