cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Power BI Embedded with validation

Hello,

 

This is my first post. If I have posted at wrong place, please help me post at correct forum.

 

Background:

 

In one Web application of ours, which is authenticated we have links to download a PBIX files. The idea was to provide a Power BI report which the user can download and open with Power BI desktop.

Once downloaded, the user can then click on "Refresh", which will prompt the user for user credentials. The user get authenticated, the Report is then rendered with data available to the user. This was all handled via Desktop.

The connection is via a autheticated OData service.

 

Now, our intention is to say "embed" a report, such that the user does not have to download the report, rather can see the report on a page of web application.

The users that we have do not come along with any Azure or Power BI subscription of their own.

 

 

While trying out the embedded option, I provisioned the workspace and imported the report. I used that report to embed and run across following problems:

 

1. The report does render but the data that is visible is that of the user who "imported" the report. i.e. my account & not the logged in user

2. I looked at various QueryString or parameters for the Embedded but could not found a way to pass on the credentials or user information for quering user specific data

3. I could not see an option to customize the DataSet before import such that the imported PBIX is just a template or Structure instead of Structure + Data.

 

Question:

What is the way to embed a Power BI report in a web application so that the authenticated user can see specific data? I could not find any resource.

Also, if not embedded, what is another way of supporting such basic requirement of showing a report in web application

I also explored if I can use Direct Query instead of OData service, but basic requirement of sending credentials or user information still stays.

 

I will be great if someone can point me to a solution about how this can be done.

 

Regards,

~Mayur

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Power BI Embedded with validation

@mayurkotlikar What you need is Row Level Security (RLS) implemented on your pbix file. Check out this blog post that goes through on how to implement RLS for power bi embedded.

View solution in original post

4 REPLIES 4
Highlighted
Community Champion
Community Champion

Re: Power BI Embedded with validation

@mayurkotlikar What you need is Row Level Security (RLS) implemented on your pbix file. Check out this blog post that goes through on how to implement RLS for power bi embedded.

View solution in original post

Highlighted
Frequent Visitor

Re: Power BI Embedded with validation

Thanks for the link, I will try. We dont have Roles but I can fake one.

 

The part that I have not understood is the "app token". I am not sure how I can pass on the token with username: and role:.

Do you know how can I send it?

 

For embedded I just use the url which I get from the Report object.

Highlighted
Frequent Visitor

Re: Power BI Embedded with validation

I tried the example from the link and it does not work for me.

 

The report is always rendered with all the records. I used PowerBIToken.CreateReportEmbedToken to pass on the user name as parameter and followed each step.

Highlighted
Frequent Visitor

Re: Power BI Embedded with validation

So, the Row Level Security and Update to the Nuget package did the trick.

 

Only change I did in code was to pass on the user name via PowerBIToken.CreateReportEmbedToken().

 

 

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors