ARTIFACTORY: How to get the list of enabled/disabled/invited/locked users in Artifactory

Products
Frog_Artifactory
Content Type
Administration_Platform
AuthorFullName__c
Vaibhav Jain, Jordan Tangy
articleNumber
000006092
FirstPublishedDate
2024-05-08T08:24:07Z
lastModifiedDate
2025-07-22

ARTIFACTORY: How to get the list of enabled/disabled/invited/locked users in Artifactory

In this Knowledge Base article, we will be discussing how to get the users that are active/enabled, locked, etc using the REST API. We need to have the jq installed to run the REST API and then filter the output. 

The REST API that needs to be executed is the GET users list and then the jq will filter the output based on the requirements. 
curl -H  "Authorization: Bearer <ACCESS-TOKEN>" -X GET "http://<PLATFORM-URL>/access/api/v2/users" -s |  jq '.users[] | select(.status=="enabled")'

Please note that the above REST API can be executed by admin users only. This will list only the enabled users that are active users. Below are the various scenarios with different outputs.

1. To fetch the enabled users
curl -H  "Authorization: Bearer <ACCESS-TOKEN>" -X GET "http://<PLATFORM-URL>/access/api/v2/users" -s |  jq '.users[] | select(.status=="enabled")'

{
  "username": "test1",
  "realm": "internal",
  "status": "enabled",
  "uri": "/access/api/v2/users/test1"
}
{
  "username": "test2@jfrog.com",
  "realm": "saml",
  "status": "enabled",
  "uri": "/access/api/v2/users/test2@jfrog.com"
}
{
  "username": "aatest",
  "realm": "internal",
  "status": "enabled",
  "uri": "/access/api/v2/users/aatest"
}
{
  "username": "test3@jfrog.com",
  "realm": "saml",
  "status": "enabled",
  "uri": "/access/api/v2/users/test3@jfrog.com"
}

2. To fetch the locked users 
curl -H  "Authorization: Bearer <ACCESS-TOKEN>" -X GET "http://<PLATFORM-URL>/access/api/v2/users" -s |  jq '.users[] | select(.status=="locked")'
    {
        "username": "test1",
        "realm": "internal",
        "status": "locked",
        "uri": "/access/api/v2/users/test1"
}
{
        "username": "test2",
          "realm": "internal",
        "status": "locked",
        "uri": "/access/api/v2/users/test2"
}

For more information on the REST API commands, kindly refer to the below documentation:-
Get Users list API
Platform REST APIs