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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors