Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/21/2024 11:01 PM
Hello Team,
I have created below runtime analytics in our instance.
Custom - Reportee Access Details Report
SELECT
u.username,
u.manager as USERCONTEXT,
m.username AS manager_username,
CASE U.STATUSKEY WHEN '0' THEN 'INACTIVE' WHEN '1' THEN 'ACTIVE' END AS USERSTATUS,
accounts.name AS account_name,
endpoints.ENDPOINTNAME,
CASE WHEN accounts.STATUS IS NULL THEN 'NOT AVAILABLE' WHEN accounts.STATUS = 1 THEN 'ACTIVE' ELSE accounts.STATUS END 'ACCOUNT STATUS',
ev.entitlement_value
FROM
users u
LEFT JOIN user_accounts ua ON ua.userkey = u.userkey
LEFT JOIN accounts ON accounts.accountkey = ua.accountkey
LEFT JOIN endpoints ON endpoints.ENDPOINTKEY = accounts.ENDPOINTKEY
LEFT JOIN account_entitlements1 ae ON ae.accountkey = accounts.ACCOUNTKEY
LEFT JOIN entitlement_values ev ON ev.entitlement_valuekey = ae.entitlement_valuekey
LEFT JOIN entitlement_types et ON et.entitlementtypekey = ev.entitlementtypekey
LEFT JOIN users m ON m.userkey = u.manager
WHERE
u.statuskey = 1
AND accounts.STATUS IN (
'1', 'Active', 'Manually Provisioned'
);
When the respective manager logs into Saviynt he/she is able to view the data correctly.
Issue :
When we are invoking the above analytics via API :
https://manish.saviyntcloud.com/ECM/api/v5/fetchRuntimeControlsDataV2
by passing below attributes :
Solved! Go to Solution.
04/22/2024 01:47 AM
Service account will be able to fetch data where that person is manager in this case you need to use different report for service account . User context is used for UI purpose
04/23/2024 03:58 AM
Hello All,
Fixed this as below :
SELECT
u.username AS 'USERNAME',
m.username AS 'MANAGER USERNAME',
CASE U.STATUSKEY WHEN '0' THEN 'INACTIVE' WHEN '1' THEN 'ACTIVE' END AS 'USER STATUS',
accounts.name AS 'ACCOUNT NAME',
endpoints.ENDPOINTNAME AS 'ENDPOINT NAME',
CASE WHEN accounts.STATUS IS NULL THEN 'NOT AVAILABLE' WHEN accounts.STATUS = 1 THEN 'ACTIVE' ELSE accounts.STATUS END 'ACCOUNT STATUS',
ev.entitlement_value AS 'ENTITLEMENT NAME'
FROM
users u
LEFT JOIN user_accounts ua ON ua.userkey = u.userkey
LEFT JOIN accounts ON accounts.accountkey = ua.accountkey
LEFT JOIN endpoints ON endpoints.ENDPOINTKEY = accounts.ENDPOINTKEY
LEFT JOIN account_entitlements1 ae ON ae.accountkey = accounts.ACCOUNTKEY
LEFT JOIN entitlement_values ev ON ev.entitlement_valuekey = ae.entitlement_valuekey
LEFT JOIN entitlement_types et ON et.entitlementtypekey = ev.entitlementtypekey
LEFT JOIN users m ON m.userkey = u.manager
WHERE
u.statuskey = 1
AND accounts.STATUS IN (
'1', 'Active', 'Manually Provisioned'
)
AND m.username ='${uname}';
04/23/2024 05:49 AM
In short as mentioned initially thats true usercontext cant be used and dynamic report needs to be used