How to Create a custom Report to List Users within a Specific Role
Objective
This article guides you through creating a custom SQL-based report in the Identity Administration portal. This report queries the database directly to list all users belonging to a specific role (e.g., "Privilege Cloud Users") and shows their username, email address, and last login time. This is an alternative to using a JavaScript-based report for user and role auditing
Environment
Identity Reports
Procedure
1. Open the Admin Portal and navigate to Reports > New Report.
2. Name your report (e.g., 'Role Members Login Report') and click Save.
3. Click on Edit Script and paste the following script:
--
SELECT
u.username,
u.email,
u.lastlogin
FROM
User u
INNER JOIN
RoleMember rm ON rm.ID = u.ID || '_' || (
SELECT r.ID
FROM Role r
WHERE r.Name = 'Privilege Cloud Users'
)
--
4. Save and run the report.
You can customize the role name or add additional fields as needed.