This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Is it possible to embed a Power BI report in a php application. If so, how to generate access token and embed url using php?
Any help will be appreciated. Thank you in advance.
Solved! Go to Solution.
Hi @verma_pragya ,
There are a number of steps you need to take:
Now you should have a workspace id.
Now you should have a report id.
And now you should have a report in your app.
Reference: https://stackoverflow.com/questions/39770804/use-powerbi-embedded-in-php
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @verma_pragya ,
There are a number of steps you need to take:
Now you should have a workspace id.
Now you should have a report id.
And now you should have a report in your app.
Reference: https://stackoverflow.com/questions/39770804/use-powerbi-embedded-in-php
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Power BI Embedded (microsoft.com) You'll probably want to go with the JavaScript API. Do you have Azure AD?
Yes, I have Azure AD. I can embed a report using c# and python to generate the access token and embed URL, and javascript rest APIs to embed. However, I have no clue on how to generate access token using PHP, since I want to embed report in my PHP application.
I'm working on a similar problem...trying to embed for customers in Drupal. So far, my solution is to use the python (with flask) solution and potentially embed the flask service URL (localhost:5000 for now) in an iframe to serve the report. It works in my local Drupal instance. I'm working on how to pass the Drupal user id to the Javascript and then to the PowerBI API for row level security.
Good luck!!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 10 | |
| 8 | |
| 3 | |
| 3 | |
| 2 |