This website uses Cookies. Click Accept to agree to our website's cookie use as described in our Cookie Policy. Click Preferences to customize your cookie settings.
From my application, fetch a list of dashboards our logged in user has access to in Sisense. Is there any way to cleanly do this via API without using the access token for each individual user and use an admin API?
Or if access token is needed, somehow fetching the access token after logging in the user via OIDC SSO.
Otherwise, I'll have to fetch a user's groups and scan through /dashboard to find dashboards with matching group ids
In addition to the suggested plugin by @Ravid_PaldiTeam , if you would like a dashboard that displays the list of dashboards along with the users/groups they are shared with, you can build it using the following APIs(Using Admin Token):
GET /api/v1/dashboards/admin - Fetches the list of all dashboards - shared object for each dashboard, which includes the user/group ID with whom the dashboard is shared.
GET /api/v1/users - Retrieves all users list - Retrieves user role id - Object Groups - require to parse as it's contain a list of Group id's which the users is belongs to.
GET /api/roles - Fetches the list of all roles.
GET /api/v1/groups - Fetches the list of all groups.
Possible Implementation: create CSV tables or Tables in the database (in case it's API base with Scheduler) as the following structure and build a data model on top of it.
Create Users Dimension Table and Merge Users info with Roles Info.
Create Groups Dimension Table.
Create Users Group Table, which is a Union ALL of the following sub tables: - Parse the Object groups from GET /api/v1/users - it will provide the list of users and Groups. - Everyone Group - is a sisense default groups which means all users belong to the same tenant. Dashboard shared with Everyone, means all users has access. * Get the Everyone Group ID from the Groups table and assign all users to this group id - Admin Group - is a sisense default group which contain the list of all Admin users. Admin Users are users which have the following Roles: Sys. Admin, Admin, Data Admin, Tenant Admin (for multi tenant cases). * Get the Admins Group ID from the Groups table and assign all users with Admin roles
Create Dashboard (Fact) table - Note that the dashboards API can provide multiple records for the same Dashboard OID. Table Logic breaks into the following sub tables: - First table - Share type = 'User' - Second table - filter on Share type = 'Group' and join the dashboard information with the Users_groups table. this join will translate the information of the Dashboard shared with Groups into the users belongs to that Groups. - Use Union to remove duplication records.
I dont think there is such an endpoint/feature. Would be nice though. I know @Ravid_PaldiTeam has a plugin called User Access which does exactly this, but only in Sisense itself. Perhaps he can extend it with an API.
The way we do it now (which could perhaps be usefull for you) is to import the Sisense application DB in an Elasticube. Do some datamodelling and create a table that specifically shows per user to which dashboards they have access to (either directly or via a group). When you did this, you could query this table via an API. The only thing you would need is userID or the user's email
I wanted to follow up to see if the solutions offered by @HamzaJ or @Ravid_PaldiTeam worked for you.
If so, please click the 'Accept as Solution' button on the appropriate post, that way other users with the same questions can find the answer. If not, please let us know so that we can continue to help.
In addition to the suggested plugin by @Ravid_PaldiTeam , if you would like a dashboard that displays the list of dashboards along with the users/groups they are shared with, you can build it using the following APIs(Using Admin Token):
GET /api/v1/dashboards/admin - Fetches the list of all dashboards - shared object for each dashboard, which includes the user/group ID with whom the dashboard is shared.
GET /api/v1/users - Retrieves all users list - Retrieves user role id - Object Groups - require to parse as it's contain a list of Group id's which the users is belongs to.
GET /api/roles - Fetches the list of all roles.
GET /api/v1/groups - Fetches the list of all groups.
Possible Implementation: create CSV tables or Tables in the database (in case it's API base with Scheduler) as the following structure and build a data model on top of it.
Create Users Dimension Table and Merge Users info with Roles Info.
Create Groups Dimension Table.
Create Users Group Table, which is a Union ALL of the following sub tables: - Parse the Object groups from GET /api/v1/users - it will provide the list of users and Groups. - Everyone Group - is a sisense default groups which means all users belong to the same tenant. Dashboard shared with Everyone, means all users has access. * Get the Everyone Group ID from the Groups table and assign all users to this group id - Admin Group - is a sisense default group which contain the list of all Admin users. Admin Users are users which have the following Roles: Sys. Admin, Admin, Data Admin, Tenant Admin (for multi tenant cases). * Get the Admins Group ID from the Groups table and assign all users with Admin roles
Create Dashboard (Fact) table - Note that the dashboards API can provide multiple records for the same Dashboard OID. Table Logic breaks into the following sub tables: - First table - Share type = 'User' - Second table - filter on Share type = 'Group' and join the dashboard information with the Users_groups table. this join will translate the information of the Dashboard shared with Groups into the users belongs to that Groups. - Use Union to remove duplication records.