Maintain ServiceNow Approvers
Overview
This guide outlines the process for maintaining an up-to-date list of ServiceNow Approvers using a scheduled script execution record. The goal is to ensure that only users who have received approval requests in the last 30 days remain in a custom group called “ServiceNow Approver Users” group. This helps optimize license usage by removing inactive approvers, while a separate flow is responsible for adding new approvers and their delegates as needed.
Problem Statement
ServiceNow Approvers are assigned the Business Stakeholder license, which incurs a cost. Over time, users who no longer participate in approval workflows may remain in the approvers group, leading to unnecessary license consumption. To minimize costs and maintain an accurate list of active approvers, it is necessary to regularly remove users who have not received approval requests within a configurable time window (e.g., 30 days).
Solution: Process Engine
To dynamically grant the approver role only when needed (rather than providing standing access), use an automated flow or script. In this implementation, a Flow called “Assign Approver License” is triggered whenever a record is created on the approval table (sysapproval_approver). The flow logic:
- Checks if the approver has any delegates. If so, it adds the delegate(s) to the “ServiceNow Approver Users” group.
- Adds the primary approver to the group if they are not already a member.
This ensures that only users actively involved in approval processes (and their delegates) are granted the necessary roles and group membership.
Refer to the following flow diagram for an overview of the logic:
