Create a single chart that can serve a multitenant application and make chart data client specific

I have created my first mongoDB chart from my Notes collection. Our Notes collection has a clientID. I would like to create this generic chart that can be used by all clients. How can I configure the chart so that chart viewers(users) of one client are not able to view data of another client?

I don’t want to create one chart per client.

Hi @Rickson_Menezes -

Thanks for using Charts! Within the main Charts application, while you can use dashboard filtering to filter all charts by a specific client ID, there isn’t a way to force specific people to use specific filters.

However this feature does exist when you use Embedding in Authenticated mode. There is a feature called Injected Filters, whereby you can use information in the JWT token from each user to apply appropriate filters to the embedded charts. For details see Filter Embedded Charts — MongoDB Charts.

Let me know if this will work for you!

1 Like

Hi Tom,

Thanks for the quick response. This will work for us.

Is there a way to also restrict the chart author to only see data of his own client (clientID 3) while chart is being created on his dashboard? Our data(datasource) has data of all clients(say, ID 3,4,5,6) but we’d like to give permission to one client create charts only for his own client and another chart author to be able to create charts of his own data(say clientID 4)



Unfortunately there isn’t a way of forcing filters on chart authors. We do have longer term plans to provide more granular permissions, and we will take your requirement into account.

1 Like

Hi Tom,

Thank you for your reply. Can I know how what priority is set for multi-tenancy on the authoring side above? Is it something that is long term within the netx 6 months or not something on the ball park for now?

Will apreciate some idea from your side.


Not planned in the next 6 months I’m afraid.

1 Like

In the same line of thought, will you enable a public link version of mongoDB charts, that is at least password protected or can rely on 2FA? We would like to share specific dashboards with specific clients, however adding them to MongoDB as project viewers is not desired (essentially we only want them to view the dashboard and nothing else).

Agree this would be a nice feature, but it’s actually pretty simple to roll your own solution for this. You can build a simple App Services app, turn on authentication for your users, and then embed your dashboard with an authentication provider tied to that app. Let me know if you need more info on how to do this.