ServiceNow License Counts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2015 06:26 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2015 07:31 AM
Counting Licensed Users - ServiceNow Wiki
To get specific number of users with each role, do this in a background script:
var user = new GlideRecord('sys_user');
user.addActiveQuery();
user.query();
var count = 0;
while(user.next()){
var role = new GlideRecord('sys_user_has_role');
role.addQuery('user', user.sys_id);
role.addQuery('role.name', 'itil');
role.query();
if(role.hasNext()){
count++;
}
}
gs.print(count);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2015 09:58 PM
Robert,
I have recently written a script that runs as a scheduled job to populate a user-defined field (u_type) to identify each user as one of the following:
- Administrator
- Approver
- Fulfiller
- Requester
- Other
I have made the script available on my Google Drive for you to copy and paste into a scheduled job. Give it a try and let me know if you have any questions. All the script does is check user roles and update the user-defined field (u_type) in the sys_user table.
Cheers,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2016 06:09 AM
Hello Jeff
Please ignore my last message regarding google drive availability.
It was a local proxy error at my building.
Apologies. Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2016 08:08 AM
No worries. Let me know if you have any questions.