Report of Data Insight Users
Hi,
Apology this question is related to internal tables rather than DQL, but hopefully someone on here may be able to help.
I need to create an automated report or script that captures a list of the Data Insight users and their respective roles to enable regular reviews of who has access to the data insight console. We currently have a manual process using the GUI, but need to move to an unattended solution that captures this information, merges it with other records and submits the final report to an access management system where access to the Data insight console is reviewed and if necessary revoked.
Data Insight config.db has a table called “matrixuser” which contains details of the user accounts such as thier login and domain names, and a table called “role” which contains details of all the roles that are available in Data Insight --- but I can’t find anything that shows which users have been assigned to which roles.
Does anyone know how or where to find this
Kind regards
Phil.
Hi Rishi, thanks for your advice. FYI, I made a couple of changes to the query as shown below to handle the role names so that they the same as displayed in the GUI.
Regards
Phil
SELECT
lower(matrixuser.login) AS LOGIN_NAME
,lower(matrixuser.domain) AS DOMAIN_NAME,CASE
WHEN role.name = 'mx_super_admin' THEN 'Server Administrator'
WHEN role.name = 'mx_sys_admin' THEN 'Product Administrator'
WHEN role.name = 'mx_storage_user' THEN 'Storage User'
WHEN role.name = 'mx_user' THEN 'User'
ELSE role.name
END AS ROLE
FROM rba
INNER JOIN matrixuser ON matrixuser_id = rba.principal_id
INNER JOIN role ON role.role_id = rba.role_idWHERE
matrixuser.login != "matrixuser"
AND rba.object_type = 1
;