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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to authenticate to api urls of Power BI in Web App?

I need help in getting the dashboard which has been shared with me in the Power BI. I need to know which API would be sutitable to show the Dashboard in the iFrame in my Web App. Also, I need to know how to authenticate to the api.powerbi.com which Authentication Code I would use to send in the request. 

 

Please provide a sample code so that it would be easier to understand the code and the workflow. 

2 REPLIES 2
Jayendran
Solution Sage
Solution Sage

Hi @Anonymous 

 

Basically you are looking for PowerBI embedded analytics  which helps you to embed your dashboard in Iframe / Javascript.

 

There are 2 approaches here.

1. App owns data- You need to have a service account/SPN to autenticate to generate the embed token and embed your dashboard

2. User owns data- Users who logging into your webapp their using their own autentication to generate the embed token and embed your dashboard

 

 

You can see the both sample code below

 

https://github.com/microsoft/PowerBI-Developer-Samples/tree/master

 

 

HI @Anonymous 

 

Do you have any update ? If my replay helps please accept it as answer/giving kudos which will help other community members

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.