Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi!
So I'm developing a modern web app using flask + Angular, and my backend (flask) is stateless.
I need to call some APIs in the backend like get reports, dashboards of a user ... is there any solution to this ?
- I tried to register the backend app in azure portal as a web app but the problem is that the login will be requested from the front and the redirect uri is on the backend + the backend is stateless so it was impossible to implement.
- Then I tried to register the frontend as an spa but the problem is that I need to process the data received from the requests in my backend app.
Any solution to this situation please ??
Thank you in advance
Hi @hajarac ,
Please review the following links, hope they can help you...
Embed power bi dashboard into Flask Application
Yes, you can embed your power bi report in your flask web application. There are two methods to achieve this -
- Embedding for your organization - Reference link
- Embedding for your customers - Reference link
I will focus on the second method (it will require pro account):
Step 1: Register your power BI application here. Moreover, copy your application id.
Step 2: Then grant permissions to the application in azure portal.
Step 3: Collect the following variable details while performing the the above two steps -
- workspace id
- report id
- tenant id
- client id / application id (from step 1)
- power bi account username
- power bi account password
Step 4: You can use the sample flask web app provided by Microsoft for embedding.(Github link).
In this project you will have to provide the details (collected in step 3) in the file "config.py". However, this method requires a Pro license. The files that contain embedding code are in the folder Service and Models. The folder static and templates contains the front-end html and css code. Which you can always change as per your webpage, and the routes are managed in app.py
If you don't own a pro license then you can simply publish the report the on the web (which is not secure and everyone on the internet can view it). Then you will get an iframe code which you can inculcate in the html code of your flask web app (or any other web app).
Best Regards
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 |
User | Count |
---|---|
8 | |
6 | |
4 | |
4 | |
4 |