The CreatorCon Call for Content is officially open! Get started here.

How to create a report on all the individual users in the system currently holding roles?

The Matrix
Tera Contributor

Hi All,

How do I create a Dashboard Report on the detailed audit trail of user roles, including the role ID assigned to each user, who added or removed the role, and the corresponding timestamps. 

 

Thanks!

1 ACCEPTED SOLUTION

M Iftikhar
Giga Sage

Hi @The Matrix,

To achieve a dashboard report that shows the audit trail of user role assignments, including the role ID, user assigned, who added or removed the role, and timestamp, please follow these steps:

1. Ensure the glide.role_management.v2.audit_roles Property is Set to True

  • Navigate to System Properties > All Properties.

  • Search for the property glide.role_management.v2.audit_roles.

  • If the property exists, ensure its value is set to True.

  • If the property does not exist, create a new property with the following details:

    • Name: glide.role_management.v2.audit_roles

    • Type: True/False

    • Value: True

MIftikhar_0-1760607310744.png

Setting this property to True enables automatic auditing of role assignments and removals, recording the relevant details in the sys_audit_role table (user, role, the user who made the change, and the operation performed).

2. Verify the sys_audit_role Table

The sys_audit_role table will now capture all role assignment and removal activities. Key fields in this table include:

  • Created: Timestamp when the role was assigned or removed.

  • Changed By: The user who made the change.

  • Operation: Indicates whether the role was added (insert) or removed (delete).

  • Role: The role assigned or removed.

  • User: The user to whom the role was assigned or from whom it was removed.

MIftikhar_1-1760607340389.png

3. Ensure sys_audit_role Table is in the glide.ui.permitted_tables system property

  • Navigate to System Properties > All Properties.

  • Search for the property glide.ui.permitted_tables.

  • Verify that the sys_audit_role table is included in the list of permitted tables. If not, add it to the list.

MIftikhar_1-1760610872251.png

The glide.ui.permitted_tables property controls which tables are available for reporting and UI access. If sys_audit_role is not listed here, you won't be able to create reports on that table. 

4. Create the Report on the sys_audit_role Table

  1. Navigate to Platform Analytics Administration > Usage and governance > Reports, Click New.

  2. Set the Report Source:

    • Report Name: User Role Assignment Audit Trail

    • Source Type: Table

    • Table: Audit Role [sys_audit_role]

MIftikhar_4-1760611078912.png

5. Go to the Type tab and select the Report Type "List"

MIftikhar_3-1760611068444.png

6. In the Configure tab, add the following columns to your report:

  • Created: Timestamp when the role was assigned or removed.

  • Changed By: The user who made the change.

  • Operation: The action taken (Added/Removed).

  • Role: The role that was assigned or removed.

  • User: The user who was assigned or had the role removed.

MIftikhar_5-1760611147797.png

7. Once you have configured and save the report and add it to the dashboard.

MIftikhar_6-1760611186218.png

 

If my response helped, please mark it as the accepted solution so others can benefit as well.

 

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.

View solution in original post

2 REPLIES 2

M Iftikhar
Giga Sage

Hi @The Matrix,

To achieve a dashboard report that shows the audit trail of user role assignments, including the role ID, user assigned, who added or removed the role, and timestamp, please follow these steps:

1. Ensure the glide.role_management.v2.audit_roles Property is Set to True

  • Navigate to System Properties > All Properties.

  • Search for the property glide.role_management.v2.audit_roles.

  • If the property exists, ensure its value is set to True.

  • If the property does not exist, create a new property with the following details:

    • Name: glide.role_management.v2.audit_roles

    • Type: True/False

    • Value: True

MIftikhar_0-1760607310744.png

Setting this property to True enables automatic auditing of role assignments and removals, recording the relevant details in the sys_audit_role table (user, role, the user who made the change, and the operation performed).

2. Verify the sys_audit_role Table

The sys_audit_role table will now capture all role assignment and removal activities. Key fields in this table include:

  • Created: Timestamp when the role was assigned or removed.

  • Changed By: The user who made the change.

  • Operation: Indicates whether the role was added (insert) or removed (delete).

  • Role: The role assigned or removed.

  • User: The user to whom the role was assigned or from whom it was removed.

MIftikhar_1-1760607340389.png

3. Ensure sys_audit_role Table is in the glide.ui.permitted_tables system property

  • Navigate to System Properties > All Properties.

  • Search for the property glide.ui.permitted_tables.

  • Verify that the sys_audit_role table is included in the list of permitted tables. If not, add it to the list.

MIftikhar_1-1760610872251.png

The glide.ui.permitted_tables property controls which tables are available for reporting and UI access. If sys_audit_role is not listed here, you won't be able to create reports on that table. 

4. Create the Report on the sys_audit_role Table

  1. Navigate to Platform Analytics Administration > Usage and governance > Reports, Click New.

  2. Set the Report Source:

    • Report Name: User Role Assignment Audit Trail

    • Source Type: Table

    • Table: Audit Role [sys_audit_role]

MIftikhar_4-1760611078912.png

5. Go to the Type tab and select the Report Type "List"

MIftikhar_3-1760611068444.png

6. In the Configure tab, add the following columns to your report:

  • Created: Timestamp when the role was assigned or removed.

  • Changed By: The user who made the change.

  • Operation: The action taken (Added/Removed).

  • Role: The role that was assigned or removed.

  • User: The user who was assigned or had the role removed.

MIftikhar_5-1760611147797.png

7. Once you have configured and save the report and add it to the dashboard.

MIftikhar_6-1760611186218.png

 

If my response helped, please mark it as the accepted solution so others can benefit as well.

 

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.

Ankur Bawiskar
Tera Patron
Tera Patron

@The Matrix 
you can leverage OOTB sys_audit_role table for this

refer below links for the help and other member have already shared the steps

Audit user roles 

Enable role auditing with Contextual Security: Role Management V2 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader