ServiceNow Subscription Usage, License Utilization, Counting Licensed Users.
1. Users without any role - Free (who can view ESS portal)
2. Users who are fulfiller (Like working on the change, incident etc) -> Normally they need ITIL role and are charged. - licensed users
A. SUBSCRIPTION
https://<instance>.service-now.com/nav_to.do?uri=/license_details_list.do%3Fsysparm_userpref_module%3D51410040c3322100f4a13b251eba8fbc%26sysparm_clear_stack%3Dtrue
>> Subscription Management > Subscriptions
>> Instance Usage


B. Default report
| Image | Description |
|---|---|
| 01. >> System Security > Reports > Role Allocation | |
| 02. Looking results... | |
C. Coding
Counting using script By mallen_nspi
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);
D. Couting
Looking for sys_user_has_role
https://<instance>.service-now.com/nav_to.do?uri=/sys_user_has_role_list.do
01. export
02. Download
03. let just user column

04. Remove duplicates

E. REPORT
New Report (file attached)
01. Navigate >>Reports > View / Run
02. Create a report
03. type the Report Name
Select Source Type: Table
Table: sys_user_has_role
04. Select Bars
05. Select Group By Role
06. Run
07. Result
Monitoring how subscriptions are allocated
View your subscription applications and allocation levels
Why a subscription might not appear in the list
Allocating users to a Per-User subscription
Monitor how resources are allocated to subscriptions
Monitor subscription compliance
https://www.servicenow.com/community/now-platform-articles/servicenow-subscription-usage-license-utilization-counting/ta-p/2321993