Micro Focus Expert
Micro Focus Expert
251 views

How to list users with their roles?

Jump to solution

How to list users with their roles?

For audit, insight and overview purposes it's needed to view/list/report which roles are assigned to which user.

1 Solution

Accepted Solutions
Vice Admiral Vice Admiral
Vice Admiral

Hi,

you need the authentication token (https://docs.microfocus.com/itom/SMAX:2020.11/ConnectToRESTAPI) and with this you can use the URL https://<host>:<port>/rest/<tenant-id>/rms/AuthorizationPrincipalResourceJSON?filter=UserId='<upn>'

You receive a JSON and you can find an array "Roles" in this JSON with all roles of the user or group.

Hope this helps...

BR, Volker

View solution in original post

6 Replies
Vice Admiral Vice Admiral
Vice Admiral

Hello,

currently there is no way to fulfill your request. You cannot create a list of roles and see which users are assigned in SMA-X. Since we had a similar need, I wrote a small program using the REST API iterating over all users and storing the needed data in a separate database.

There might be an item on the roadmap concerning user management in SMA-X, but I am not sure.

BR, Volker

Hello,

What tables and relationships did you use when developing your application?

0 Likes
Vice Admiral Vice Admiral
Vice Admiral

Hi,

you need the authentication token (https://docs.microfocus.com/itom/SMAX:2020.11/ConnectToRESTAPI) and with this you can use the URL https://<host>:<port>/rest/<tenant-id>/rms/AuthorizationPrincipalResourceJSON?filter=UserId='<upn>'

You receive a JSON and you can find an array "Roles" in this JSON with all roles of the user or group.

Hope this helps...

BR, Volker

View solution in original post

Is it possible to do this through a database?
0 Likes
Vice Admiral Vice Admiral
Vice Admiral

You mean that the query is not made with REST API but with SQL query? That is certainly possible, but I have not (yet) done a full reverse engineering of the database structure, so I can't make a recommendation there.

0 Likes
Micro Focus Expert
Micro Focus Expert

Hello,

This capability is currently not supported. There is an idea opened and you can vote on it:

https://community.microfocus.com/t5/SMA-Idea-Exchange/Report-with-users-amp-Roles/idi-p/2746971

The API provided here is a private API and should not be used for reporting purposes. It is subject to change without notice and has not been designed/validated for extracting large amounts of data.

Direct database access is not recommended.

Best regards,.

Brindusa

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.