Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

We need to find new owner of entitlement if current owner is terminated or left the organization.

New Contributor
New Contributor

Basic Approval Flow in system :

If User is termed and if that termed user owns any entitlements, system will assign those entitlements to his manager.

Edge Case that we are discussing now is,

If user and his manager are termed on the same day the system doesn’t know what to do and assigning those requests to “Admin”.

Currently we have around 1000 entitlements in the system whose owner is ‘Admin’.

To find these entitlements owned by Admin, navigate to “users-> click on Advanced (in username field search with “Admin”)->go to Approvers tab where you can find all the entitlements assigned to admin.

Ask –

For all those entitlements we need to write a SQL to generate a report to figure out ,

who is the old owner and who is the one level up manager in the chain whose status is active and his band.

Once we have a report of who can be the next active owner from the chain, via API we can update all the entitlement owners.


Example which explains the ask:

If entitlement owner ‘A’ is termed and

A’s manager ‘B’ also termed on the same day ,

Ideally, we must check for B’s manager ‘C’ and if he is active, we have to make him as the entitlement owner.


Additional Information regarding writing SQL:

Pull all the entitlements whose owner is admin and from the “entitlements update history” we have to pull who is the previous owner and his status and band , if he is termed we need to go one level up and see who is his manager and his status likewise we need to go one level up in the chain and check for who is the next active manager along with his band.

Note: Using “Userkey” can we need find the manager’s and status.


It seems like we need to use recursice functions as we need to check if A's Manager B is in system and if not then B's manager C is in system an d if not then C's manager D and so on.


Please help on this.



Saviynt Employee
Saviynt Employee

Hello @MS98KPMG.

We are checking it internally, we will keep you posted.


If you find the above response useful, Kindly Mark it as "Accept As Solution".


In report you can have multiple check if else for recursive check

Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.