Different table of dashboard for different user dynamically

So I’m building a web application in which I want to use a third-party auth which will get me the table name of the database of the user and I want to show the user’s IoT device data based on that table. I want to do all this dynamically without actually adding a user to the dashboard. Basically, I want a way to change the table name in the query dynamically through the website itself.

Welcome @vishalsonyabc to the Grafana forum.

If the users are created (and deleted) automatically by your source / 3rd party auth / whatever, why not just use filters on the column heading, e.g.


Hi Grant,
I want to change the table name (“BMS Data”) based on who is viewing the dashboard and then fetch the data of that table only to present it on the dashboard.
If we are unable to do that, I want a filter for the viewer to choose their own table.
Also these all are supposed to be time-series graphs.

hello, you can use grafana variable and use it in your query.
grafana variable can be a query itself , like a list your column name, refreshed every dashboard loading

Further to what @alexandrearmand said, here is something similar that I use:

1 Like

Thank You, Now I’m able to list all the users and see their data, but can there be a way that a specific user can see only their data using the same dashboard?

Look at this thread

1 Like

Thanks yosiasz, That helped a lot. The last thing I need to do is add a way that when I log in using firebase authentication through my web application and when I redirect the user to grafana it should not ask for authentication again and just show them their dashboard.

I would post that as a new question