Finding duplicate user accounts
Get the total number of duplicate user accounts
You can get the total number of duplicate user accounts by calling the count
method, where <BASE_URL>
is the URL of your Jira instance and <USERNAME>:<PASSWORD>
are your Jira username and password:
curl -X GET "<BASE_URL>/rest/api/2/user/duplicated/count" \
-u "<USERNAME>:<PASSWORD>"
The response is a dictionary with a count
property that stores the total number of duplicate user accounts. For example:
{
"count": 1
}
Get a detailed list of duplicate accounts
You can get a list of all the duplicate user accounts by calling the list method, where <BASE_URL>
is the URL of your Jira instance and <USERNAME>:<PASSWORD>
are your Jira username and password:
curl -X GET "<BASE_URL>/rest/api/2/user/duplicated/list" \
-u "<USERNAME>:<PASSWORD>"
The response is a dictionary listing each duplicate user account as a separate property that stores an array of objects. Each object in the array contains the user directory ID, the directory name, and a boolean flag indicating whether the account is active. For example:
{
"johndoe": [
{
"directoryId": 1,
"directoryName": "Jira Internal Directory",
"userActive": true
},
{
"directoryId": 10000,
"directoryName": "Crowd Server",
"userActive": true
}
]
}
Response cache
The responses returned by the count
and list
methods are stored in the cache for 10 minutes. The cache is flushed automatically every time a directory is added, deleted, enabled, disabled, reordered, or synchronized.
Jira System Administrators can also flush the cache manually by adding the flush=true
query string parameter to the resource URL. For example:
curl -X GET "<BASE_URL>/rest/api/2/user/duplicated/list?flush=true" \
-u "<USERNAME>:<PASSWORD>"