Solved

Best way to share dashboards with particular users by default


  • Known Participant
  • 18 replies

Hi!

What’s the best way to share all customers dashboards with a specific user by default on GoodData Platform? We have multiple customer workspaces where they can add their own custom dashboards. All users have assigned roles via LCM.

I see I can use API call to grand an access: https://help.gooddata.com/doc/enterprise/en/expand-your-gooddata-platform/api-reference/#operation/addGrantees.

Is there an alternative way using LCM? 

 

Additionally, is there a way to show and share various dashboards with users based on their groups using LCM or API?

 

Best,

Hanna

icon

Best answer by Joseph Heun 10 October 2023, 09:37

View original

12 replies

Userlevel 3

Hello Hanna, 

The best option would be to manage your dashboards with USER GROUPS, this will allow you to share dashboards with multiple users. However, if you are looking to share multiple dashboards with single users, then I’m afraid you need to do this manually. 

Hi,

User groups article describes how to click it through in the UI, I couldn’t, however, find how to do it programatically. API docs describe endpoints to create/update/delete user groups. Are there also available endpoints for adding users to a group? Could you point me to them?

Best,

Hanna

Also, referring to “if you are looking to share multiple dashboards with single users, then I’m afraid you need to do this manually. “ - does it mean that the API endpoint I’ve found does not allow me to do it? Sometimes dashboards can be hidden but grey pages still allow me to find them: `{{baseUrl}}/gdc/md/:project_id/query/analyticaldashboard?showAll=1`. Is there similar way to share dashboards with user groups / users?

Userlevel 3

Hi Hanna, 

 

You would use the “update user group” call to add users to a group via API. First, you would GET the user group you are trying to update, and from their you can amend the body with your new usernames. 

 

You can also manage users through the user’s brick where you can add them directly to groups/workspaces upon creation. 

 

I’m afraid there isn’t a grey pages hack to share multiple dashboards with a single user. The only endpoint to add users to a dashboard is the one you previously mentioned: https://help.gooddata.com/doc/enterprise/en/expand-your-gooddata-platform/api-reference/#operation/addGrantees

Hmm,

GET user group returns a response with links to members and modifyMembers but no members list. Unfortunately I can’t find modifyMembers described anywhere in the documentation. Could you provide me with sample requests so I know what the payload should look like?

Going back to sharing dashboards - is there a way to share a dashboard wit ha group programatically, not by using UI options described in the use-groups-to-share-dashboards-with-multiple-users article?

Userlevel 3

Hi Hanna, 

 

Sorry for this. There are additional commands to use when updating the groups and I will post them below. You can change the function by the “operation” parameter. In the case of adding a user, you can use “ADD”: 

 

POST to <domain>.com/gdc/userGroups/<group+id/modifyMembers

```
SET deletes and adds users so that the group's membership is exactly as listed in the "items" array:
{
"modifyMembers": {
"operation": "SET",
"items": [
"/gdc/account/profile/a312d87ff81a2975306688000cfb915a"
]
}
}
```

```
ADD adds users to the group using the user IDs from the "items" array:
{
"modifyMembers": {
"operation": "ADD",
"items": [
"/gdc/account/profile/a312d87ff81a2975306688000cfb915a"
]
}
}
```

```
REMOVE removes users from the group using the user IDs from the "items" array:
{
"modifyMembers": {
"operation": "REMOVE",
"items": [
"/gdc/account/profile/a312d87ff81a2975306688000cfb915a"
]
}
}
```

Gray pages accept input as a comma-separated list of user URIs in double quotes:

```
"/gdc/account/profile/UID",
"/gdc/account/profile/UID",
"/gdc/account/profile/UID"
```

Thanks for those!

And for use-groups-to-share-dashboards-with-multiple-users article and sharing dashboards with groups programatically - do I understand correctly that there’s no such option and it can be done using UI only?

Userlevel 3

No problem!

You are correct. Users are assigned under domains/workspaces in the hierarchy rather than the workspaces/domains being assigned to users. 

I’m not sure If I got your response correctly.

use-groups-to-share-dashboards-with-multiple-users and share-dashboards articles describe how to share dashboards with user groups, but using GoodData User Interface. I wanted to double-check if there’s an option do share dashboards with groups via API as well. How does it refer to workspaces/domains hierarchy?

Userlevel 3

Ok, so you can create a user group with all the dashboard permissions you want to assign to that particular group, but then you would need to add users to that group as you provision them. This can be done programmatically via API. 

You can then add share dashboards to the group but this cannot be done programmatically.

I see, thanks for confirmation. Are there any plans to add support for such a feature? In GD Platform or GD Cloud? 

Userlevel 3

HI Hanna, 

It cloud it is a little bit different and was designed with this in mind. It is already available to use in cloud and you can manage dashboard permissions via API: 

https://www.gooddata.com/developers/cloud-native/doc/cloud/manage-organization/manage-permissions/set-permissions-for-dashboards/

Reply