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

Query to fetch those roles which dont have entitlements tagged to particular security systems

gagan94
Regular Contributor
Regular Contributor

HI Team,

I need to get those roles which dont have any entitlements tagged to it for particular security systems. 
I tried to get data but it is showing no data found, I am able to get the roles listed under security systems,endpoints but not those roles which dont have any entitlements tagged to it .

Can anybody help in this query what need to be add.

select r.role_name,ep.endpointname from endpoints ep,entitlement_values ev,entitlement_types et,role_entitlements re,roles r,securitysystems ss where re.rolekey=r.rolekey and re.ENTITLEMENT_VALUEKEY=ev.ENTITLEMENT_VALUEKEY and ev.ENTITLEMENTTYPEKEY=et.ENTITLEMENTTYPEKEY and et.endpointkey=ep.endpointkey and ep.SECURITYSYSTEMKEY=(select ss.SYSTEMKEY from securitysystems where securitysystems.SYSTEMNAME ='endpointname') and ev.ENTITLEMENT_VALUEKEY NOT IN(select re.ENTITLEMENT_VALUEKEY from role_entitlements re where ev.ENTITLEMENT_VALUEKEY=re.ENTITLEMENT_VALUEKEY)

Thanks in Advance

 

1 REPLY 1

rushikeshvartak
All-Star
All-Star

select r.role_name,endpointkey from roles r where rolekey not in (select rolekey from role_entitlements re where re.rolekey=r.rolekey)


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