on 09/06/2023 06:25 AM
You need to configure the below query to fetch all the information(User, accounts, entitlement values, entitlement types, endpoint config etc) related to a particular endpoint:
SELECT DISTINCT
users.displayname,
accounts.NAME,
accounts.CREATED_ON,
ENDPOINTNAME,
ENTITLEMENT_VALUE,
entitlement_types.ENTITLEMENTNAME AS Entitlement_Type
FROM
accounts
LEFT JOIN
user_accounts ON user_accounts.ACCOUNTKEY = accounts.accountkey
LEFT JOIN
users ON users.userkey = user_accounts.userkey
INNER JOIN
endpoints ON accounts.ENDPOINTKEY = endpoints.ENDPOINTKEY
INNER JOIN
account_entitlements1 ON account_entitlements1.ACCOUNTKEY = accounts.accountkey
INNER JOIN
entitlement_values ON entitlement_values.ENTITLEMENT_VALUEKEY = account_entitlements1.ENTITLEMENT_VALUEKEY
INNER JOIN
entitlement_types ON entitlement_types.entitlementtypekey = entitlement_values.ENTITLEMENTTYPEKEY
WHERE
entitlement_types.ENTITLEMENTTYPEKEY = 19
AND accounts.ENDPOINTKEY = 4
Please note that you can add or remove fields and attributes according to your requirement and update the query with the endpoint for which you are looking for details