Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
TheracPowBi
Frequent Visitor

Auto updating dashboard on a website after user connection

Hello everybody,
I have a ASP.NET project with a database on SQL server connected with direct query. I have succeded to embed my PowerBi report so I can see it on my website.

What is important is that I use a view on SQl and not directly the table. this view will display only a small part of my table, which is the data associated to the user connected at PowerBI.

So, depending on which username I put on my web.config file, I will have different data on my dashboard.

 

 

Now, I want to be able to modify my dashboard after the launch of my program.

To be more clear, when I launch my program, my website is opened, with a connection page with textbox for a login and a password, and a connection button.

When the user put his login and password, I want my program to modify the file web.config (in which I have all the information about the report id, dashboard id  and the username and password used to embed the dashboard.), to put his own login and password.

So, I will have the same dashboard, with one database but with different data depending on who is connected.

 

Is this possible ?

 

Thanks, and sorry if it's not very clear.

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @TheracPowBi 

(1)link1

vxiaotang_0-1639639014469.png

(2) As for the question " I will have the same dashboard, with one database but with different data depending on who is connected.", you can use RLS for Embedded report. Then select the right mode according to who are you embedding for.

link2

vxiaotang_1-1639639190600.png

(3) Then go to this link3 to get embed token, and copy this code into Body

{
  "accessLevel": "Edit",
  "identities": [
    {
      "username": "john@contoso.com",
      "roles": [
        "sales"
      ],
      "datasets": [
        "cfafbeb1-8037-4d0c-896e-a46fb27ff229"
      ]
    }
  ]
}

vxiaotang_2-1639639567228.png

(4) how to find the workspace id, report id, dataset id

(4.1) open the report on Service,

vxiaotang_4-1639640467559.png

(4.2) select the dataset on Service,

vxiaotang_3-1639640386922.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xiaotang
Community Support
Community Support

Hi @TheracPowBi 

(1)link1

vxiaotang_0-1639639014469.png

(2) As for the question " I will have the same dashboard, with one database but with different data depending on who is connected.", you can use RLS for Embedded report. Then select the right mode according to who are you embedding for.

link2

vxiaotang_1-1639639190600.png

(3) Then go to this link3 to get embed token, and copy this code into Body

{
  "accessLevel": "Edit",
  "identities": [
    {
      "username": "john@contoso.com",
      "roles": [
        "sales"
      ],
      "datasets": [
        "cfafbeb1-8037-4d0c-896e-a46fb27ff229"
      ]
    }
  ]
}

vxiaotang_2-1639639567228.png

(4) how to find the workspace id, report id, dataset id

(4.1) open the report on Service,

vxiaotang_4-1639640467559.png

(4.2) select the dataset on Service,

vxiaotang_3-1639640386922.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.