cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
theDarkPrince
Helper II
Helper II

Embed report within web application with dynamic slicer

Hi folks. Hope everyone is having a good day so far. In our organization, we have a web portal where different sales reps login using their own credentials. In the same portal, we want to show a Power BI report. For that, I searched around and found that Power BI Embedded is the best suitable option. Screenshot for reference:

 

theDarkPrince_1-1629790570017.png

The option highlighted in red is the only option for us. However, there's one more additional requirement - after login, each sales rep should only be able to access the data relevant to their sales office. Using the login credentials, the web application can determine which office the sales rep belongs to (by running a query against the database). Afterwards, in the embedded report, we want to restrict the data just to that sales office. Is this possible ? Has anyone achieved anything similar to this ? Any help is appreciated. Thanks in advance.

 

P.S. : Tagging some of the most knowledgable members. I hope that doesn't offend anyone. If you think that was unprofessional, my apologies. 😅

 

@GilbertQ @lbendlin @Ailsa-msft 

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. It sounds like an RLS solution. Row level security is a Power Bi feature that allows you to create rules for users. Those rules (DAX code) will filter the current model.

You can read more in microsoft doc: https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls

That will show how to implement it.

Here you have a second link in case you feel that the first documentation won't work because you have too many sales office to create rules. There are ways to make it dynamic but it might be a little more complex: https://blog.ladataweb.com.ar/post/652895563673649152/powerbi-seguridad-de-filas-rls-con-regla

I hope all of that helps you


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

Happy to help!

LaDataWeb Blog

View solution in original post

3 REPLIES 3
Suchitra
Frequent Visitor

Hi ,

I am trying to embed a power bi report with an application based on .net ,sothat when a user logs in he/she can see only his data in the report in that application . I have followed the AppsOwnData Approach and using embedding environment i have downloaded the sample application. 

So my query is In that particular solution  what are the changes i have to do for the interaction to be happen as the application is already available ..i have made the changes for web.config file like giving the report id,application id and so on but what are the other code level changes i have to do...could you please guide .. @ibarrau

Suchitra
Frequent Visitor

Hi ,

I am trying to embed a power bi report with an application based on .net ,sothat when a user logs in he/she can see only his data in the report in that application . I have followed the AppsOwnData Approach and using embedding environment i have downloaded the sample application. 

So my query is In that particular solution  what are the changes i have to do for the interaction to be happen as the application is already available ..i have made the changes for web.config file like giving the report id,application id and so on but what are the other code level changes i have to do...could you please guide ..

ibarrau
Super User
Super User

Hi. It sounds like an RLS solution. Row level security is a Power Bi feature that allows you to create rules for users. Those rules (DAX code) will filter the current model.

You can read more in microsoft doc: https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls

That will show how to implement it.

Here you have a second link in case you feel that the first documentation won't work because you have too many sales office to create rules. There are ways to make it dynamic but it might be a little more complex: https://blog.ladataweb.com.ar/post/652895563673649152/powerbi-seguridad-de-filas-rls-con-regla

I hope all of that helps you


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

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors