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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.