Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everybody,
I have a database on SQL server and an ASP.NET application that launch a website. In this website, there is a login page where an user can enter his username & password. These credentials are used to connect to SQL server, in which he only has read rights on the database.
Also, I have embed a PowerBi dashboard in my website using the database from SQL server.
What I would like is that, when an user use his credentials in the website, PowerBi will use these new credentials to connect to the same database.
I want to use this solution because I have a SQL View that filters my data on the user currently connected to SQL server.
So, when the user connect in my website, the dashboard will appear with only the data that the user is authorized to see.
But I don't know if it's possible to modify the connexion to the database, with the same datasource, without using PowerBi desktop.
Is there a way to do it only with ASP.NET ?
Thanks and have a nice day.
Hi @TheracPowBi ,
I found the following official document about restricting users with ASP.NET. This article describes how to control authorization for both of these ASP.NET authentication methods. Please refer to
Restrict users from accessing to web resources - ASP.NET | Microsoft Docs
And also there's a similar post:
how to restrict user from accessing page in asp
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I don't have a direct answer but I wanted to point you at the Row Level Security documentation in case you weren't yet aware of it since I'd expect a solution to involve RLS:
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-rls