Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Get list of endpoints whose resource owner is configured as username (example 10001)

harishyara
Regular Contributor
Regular Contributor

Hello All,

I need to get list of endpoints whose Resource Owner is configured as username (example 10001).

Please help me with query. 

Thank you.

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

SELECT E.ENDPOINTNAME,
       U.USERNAME
FROM   ENDPOINTS E
       JOIN USERS U
         ON E.REQUESTOWNER = U.USERKEY
WHERE  U.USERNAME = '10001'; 

 

rushikeshvartak_1-1728564148020.png

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Thank you for your help. Could you please let me know the query if user is present in User Group mapped as Resource Owner ?

NM
Honored Contributor III
Honored Contributor III

@harishyara you need to use usergroup table to get the required values.

SELECT E.ENDPOINTNAME,
       CASE 
           WHEN E.REQUESTOWNERTYPE = 1 THEN U.USERNAME
           WHEN E.REQUESTOWNERTYPE = 2 THEN G.USER_GROUPNAME
           ELSE 'Unknown'
       END AS OwnerName,
       CASE 
           WHEN E.REQUESTOWNERTYPE = 1 THEN 'User'
           WHEN E.REQUESTOWNERTYPE = 2 THEN 'User Group'
           ELSE 'Unknown'
       END AS OwnerType
FROM   ENDPOINTS E
       LEFT JOIN USERS U
         ON E.REQUESTOWNER = U.USERKEY AND E.REQUESTOWNERTYPE = 1
       LEFT JOIN USER_GROUPS G
         ON E.REQUESTOWNER = G.USERGROUPKEY AND E.REQUESTOWNERTYPE = 2;

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.