Non-Admin User Recovery:

ARTIFACTORY: How To Unlock A User(s) Who Is Locked Out Of Artifactory and Recover Admin Account

AuthorFullName__c
Johnson Nguyen
Best_Article_1__c
https://jfrog.com/confluence/display/JFROG/Artifactory+REST+API <recomsep> Artifactory Rest Api
Best_Article_2__c
https://jfrog.com/knowledge-base/artifactory-what-should-i-do-if-my-users-got-locked-out-of-artifactory/ <recomsep> Artifactory What Should I Do If My Users Got Locked Out Of Artifactory
articleNumber
000005479
ft:sourceType
Salesforce
FirstPublishedDate
2022-11-30T09:04:09Z
lastModifiedDate
2023-01-22T11:07:12Z
VersionNumber
2
When we have a user that is locked out of Artifactory, we can unlock them utilizing a REST API Call.
**NOTE** These REST API Calls can only be performed with an ADMIN ACCOUNT

If we don’t know what user is locked out, please run this REST API Call:
This API request will return an array of locked users.
curl -uADMIN_ACC JFROG_URL/artifactory/api/security/lockedUsers

If we know a single locked user’s username please use this REST API Call:
What this API request will do is it will unlock a specific user that is inputted in the command.
curl -uADMIN_ACC JFROG_URL/artifactory/api/security/{USERNAME} 

If we want to unlock multiple users please use this REST API Call:
When this API request is called, all locked users that are inputted in the command will be unlocked.
curl -uADMIN_ACC JFROG_URL/artifactory/api/security/{USERNAME} -H 'Content-Type: application/json' -d '[ {userA}, {userB} ]'