How to collect no. of users who have ITIL or Admin role in servicenow

bijender1
Tera Contributor

How to collect no. of users who have ITIL or Admin role in servicenow

9 REPLIES 9

Jaspal Singh
Mega Patron
Mega Patron

Hi Bijender,



You can report on sys_user_has_role (User Role) table & then group by roles.


This will give the number of times the roles are assigned, not how many users have a role - for this you have to group by "User".


JimmieOdelius
Tera Expert

Hi Bijender.



The role memberships are stored in the 'sys_user_has_role' table. Either you can create a report for that table, which can result in the wrong amount of role assignments as a role can be assigned multiple times to the same user.
OR you can run a background script and then with script remove duplicate entries.


Harsh Vardhan
Giga Patron

You can simply check "sys_user_has_role" table and you will find how many users have admin or itil role.