How to get licensed users ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2017 09:44 PM
Hi All,
We want to check how many licensed users are there in the system. Whenever we see the number of users who are having any role in system from table - "sys_user_has_role", then number comes out to be -1600, but when i am using "getRoledUsers()" function in a script, then it gives me count as 1640. So i am not sure why there is difference between user count from table and script.
Could someone please let me know, how can i calculate licensed users via script.
Regards,
Gaurav Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2017 10:37 PM
Could you post the getRoledUsers() script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2017 07:55 AM
Hi Akhil,
It is OOB function available for getting the count for licensed users. If you want to refer the code, please see global business rule by the name -> "getRoledUsers".
Thanks,
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2017 11:48 AM
Hi Gaurav,
The simple GUI way to avoid duplicate when you count user is to do your reports on the sys_user table, and not on the sys_user_has_role table.
CreateNow Users
PPS Users
ITIL Users
All users with at least a role
The same approach will also work with Glide Scripts.