ServiceNow License Counts

robertsteele
Kilo Explorer

We are using the Fuji release and attempting to get a license count of the different user roles in Service Now.   Does anyone know how I can get this information?

9 REPLIES 9

Hi Jeff,



Thanks for this!



Just one concern, some of our users have multiple duplicate roles, does this script still work?


I think it should work because it looks for the occurrence of specific roles. Here's the logic at the time I wrote the script:



  • If the user has no roles, then they are a 'requester'.
  • If the user has only ONE role and it's 'approver_user', then they are an 'approver'.
  • If the user has multiple roles and one of them is 'admin', then they are an 'administrator'.
  • If the user has more than one role and did not have the 'admin' role, then they are a 'fulfiller'.
  • If none of the previous conditions were met, then consider the user as 'other'.


Keep in mind this script is merely a means of getting a general idea of the type of users you have. You can tailor it as needed to suit your needs.



Jeff


Thanks Jeff. We definitely did modified this to fit our needs. Works like a charm and saves a lot of time!


This was very helpful, worked like a charm...thank you.