- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
11-20-2021 05:27 AM - edited 02-03-2023 10:04 PM
Starting with the Quebec release, Subscription Management provides you with the ability to monitor your user-based subscriptions by leveraging common user groups. Using these groups, you can manage your subscription consumption as part of your normal user management processes without having to manage security and entitlement separately. Therefore, it is a leading practice to assign roles to a group and add users to groups, so they can inherit the roles by the group. Avoid directly assigning roles to users whenever possible, as you have no control over subscription consumption that way. To be make sure that users are not assigned directly to roles which consume a license, this article introduces a proactive and a reactive approach.
|
|
What are licensable roles?
In your ServiceNow instance exists a little-known but all the more exciting table license_role, which contains all ServiceNow roles with their associated license type:
After grouping column "Role Type" the follow types remain:
- Admin 💲
- Approver 💲
- Business Stakeholder 💲
- Fulfiller 💲
- Requester
- Time Card User 💲
Except for the license type "Requester" all others are licensable.
Proactive approach
Using this knowledge and a small Business Rule, a block can now be established to prevent a role that is not of type "Requester" from being assigned to a user. The script of the following Business Rule also takes into account the fact that roles may in turn contain roles requiring a license:
Table | sys_user_has_role |
Advanced | true |
When | before |
Insert | true |
Filter Conditions | |
Script |
|
Now, each try to assign a role which is not of type "Request" will result in abort:
Reactive approach
As it is possible to import data without running Business Rules, you need an audit option for checking such direct role assignments on a regular basis. For this purpose, an Instance Scan check is the perfect solution.
You can create a Table Check with the following properties:
Table | sys_user_has_role |
Conditions | |
Advanced | true |
Script |
|
Further information
Subscription Management is an application that allows you to manage subscription usage and make decisions on the number of subscriptions needed for your organization. It is critical to understand your subscription usage and adoption of your ServiceNow applications, as well as view your ServiceNow licenses across the organization.
A business rule is a server-side script that runs when a record is displayed, inserted, updated, or deleted, or when a table is queried. Use business rules to accomplish tasks like automatically changing values in form fields when certain conditions are met, or to create events for email notifications and script actions.
The Instance Scan feature can help you find potential issues related to security, upgradability, manageability, user experience, and performance. You can use Instance Scans to enforce best practice implementations in your development cycle, release management, pre- and post-upgrades. The Instance Scan application is based on checks and a check is a rule that runs on tables, records, and metadata to detect issues.
- 6,249 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is great! Personally, I found this new way of managing licenses of subscriptions quite annoying, the previous way with user sets was way easier to maintain.
To decrease some of the manual effort I therefore created a small solution that adds users to certain "Subscription groups" automatically based on key roles. These subscription groups are then added as group to the respective subscription. Whenever a user is assigned a role (through group membership of course) a business rule on sys_user_has_role table checks if we need a group assignment for those roles (I set this up only for Per-user subscriptions) and adds the user to the specified groups.
The solution needs some additions if a new license is added (create subscription group, add some lines in my script for group id and role id) but in general, it manages all else by itself.
This research that you cover in the article would be a great addition to my solution, thanks for your effort to describe it.
//Per
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hey Per,
Would you mind sharing code for the solution you have implemented to automatically add users to the subscription groups? I am working on the same but couldn't finish it.
Thanks
Sailesh
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Maik,
is it just managing roles or other benefits like licensing cost we get it if we give roles through groups

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello,
For the proactive approach for preventing the assignment of roles directly to users, how do you handle creating a new knowledge base which grants the 'knowledge_manager' role directly to the user listed in the Owner field?