How to list of all users

Hi,

Is there any way to export list of all users in nexus along with the role.
In short we want to export the list of all user. Is there any way from admin UI or any file which is having this information.

Thanks
DJM

You can use the REST API to retrieve list of users, e.g.
curl -u admin:admin123 http://localhost:8081/service/rest/v1/security/users that should return output similar to:

[ {
  "userId" : "anonymous",
  "firstName" : "Anonymous",
  "lastName" : "User",
  "emailAddress" : "anonymous@example.org",
  "source" : "default",
  "status" : "active",
  "readOnly" : false,
  "roles" : [ "nx-anonymous" ],
  "externalRoles" : [ ]
}, {
  "userId" : "admin",
  "firstName" : "Administrator",
  "lastName" : "User",
  "emailAddress" : "admin@example.org",
  "source" : "default",
  "status" : "active",
  "readOnly" : false,
  "roles" : [ "nx-admin" ],
  "externalRoles" : [ ]
} ]

However, this works well only if you’ve got only local users, i.e. managed by NXRM. If you use external system for user management like LDAP or Crowd you would need to refer to those systems as NXRM will limit the response to only 100 users.
Please check our documentation on how to work with the API.

Hi
Thanks for the reply.I did tried but no output i get nothing after execution of this.
we are using 3.25.1.04

Thanks
DJM

This endpoint is available since 3.24. Maybe try replacing v1 with beta, as the beta implementation was available since 3.17. If that doesn’t help then please make sure you’re using correct host and credentials. If that would still not work, please log into your regular NXRM Web UI, go to Administration → System → API and try to find the right endpoint for your instance on the list - it’s called Security management: users. You can try the API directly on that page.

Hi Dawid,

we are able to pull the list of users using beta implementation(endpoint for the instance)
The steps which you mention have help. Thanks for this.

Regards
Dilip

1 Like