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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

How to generate Power BI report based on logged-in userId

Hi

I want to add power BI report to the dhasboard in my angular application so every user will see some reports based in his own data.

In other way i want to build a single report and have different users see only the data I want them to see based on their permissions. Admins can see everything, users can only see data with their User ID.

So my question how can make a dynamic report ?

For example by adding parameter of the UserId in the link

     
           <iframe width="300" height="200" src="https://app.powerbi.com/view?r=***" frameborder="0" allowFullScreen="true"></iframe>
5 REPLIES 5
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

If you are sharing your report based on 'publish to web' feature, it is impossible to set any filters or security setting on it.

Publish to web from Power BI#limitations 

For your scenario, you can consider setting RLS setting based on username, then it can be filtered by current username. (it required user table to mapping other tables)

RLS with UserName()  Row-level security (RLS) with Power BI 

After these, you can use power bi embedded to share your contents, it allows security settings.

What is Power BI Embedded?   Row-level security with Power BI Embedded 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
ibarrau
Super User
Super User

Hi, I think you are confusing definitions. Publish to web is to get a public URL that will be the same for everyone, you can't change that. Check this to understand the embed ways and which one is what you want:

https://guyinacube.com/2016/07/26/3-ways-to-embed-power-bi/

 

Once you get the idea. I think is going to be embed in custom login app. Then you can start coding the app with this doc:

https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html

 

Regards, Hope this helps

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


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

Anonymous
Not applicable

Whats the authorization for the user viewing this in the anjular applciaiton when it's embedded? What I'm trying to ask is does the user in question have to have a power BI license in order for the dashboard/report to render? 

 

My thought is that if the user has to have a license then the report already knows who the user is. Then you could set up role level security so that a particular user would only see the data they have access to (Such as territory or state, etc. )

Anonymous
Not applicable

Thanks for your reply

But no he doesn't have to have a pwoer bi license .He just have to log in to his profile in the application (angular Front and .net Core Back) using a token and then he can visualise some reports.

Ok. If you embed as "App Own Users" then you control the users for the Power Bi Reports. Your customers won't neet a Power Bi Licence. However, in order to put this on production you need a Power Bi Embed capacity bought from azure. This way you can have infinite embed tokens, otherwise you can get embed token with just one pro licence, but it says the pro user has a limit of embed tokens to use.

Check this link talking about and showing in github a simple project

https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-customers

https://github.com/microsoft/PowerBI-Developer-Samples/tree/master/App%20Owns%20Data

 

Regards,


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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors