You can use this Shell Script. Please modify user, password and Artifactory url
#!/bin/bash results=($(curl -u admin:password1A "http://art7.gcp:8081/artifactory/api/security/users" | jq -r '.[].name')) for i in "${results[@]}"; do admin_val=($(curl -uadmin:password1A "http://art7.gcp:8081/artifactory/api/security/users/$i" | jq -r '.admin')) if [ $admin_val == "false" ]; then echo "$i" >> non_admin_users.txt else echo "$i" >> admin_users.txt fi done