Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 4 | |
| 3 | |
| 3 |