Forum Discussion
Power Bi Integration in web app
- 2 years ago
Suvarchala7
Please check with your internal Power BI admin team, if they are allowing 'Publish to web' option then you can generate an embed code and use it in your iframe. Generally large organisations disable this option. In that case if you want to embed youe report for your customers (who does not have a valid power bi license), your Power BI content should be in a embed capacity/Premium/Fabric capacity.
Suvarchala7
As per my knowledge, embed token will have a validity of 1 hour. I would suggest you to follow the instructions here: https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-customer-app#step-1---configure-your-microsoft-entra-app-and-service-principal to create an azure app registration and add the app into workspace and grant necessary permissions for embedding the reports.
In your react app implement a section to generate a generate a new token: https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/generate-token every time a user access the application. This way you dont need to hard code the access token.
If the post helps please give a thumbs up
If it solves your issue, please accept it as the solution to help the other members find it more quickly.
Tharun
Hey, I am embedding power pi report in react, my problem is access token is expired in one hour I want to refresh this token after 45 minute using power bi APIs but I don't have azure aad how can I refresh my token without azure ad, i have my own server can I host my power bi report there, and use there APIs to refresh tokens and send any post method to power bi
- tharunkumarRTK2 years agoSuper User
Shlokyy
From what I understand, your report is in Power BI service. You cannot host one report in your server. If you want to host all your reports then you can use Power BI report server.If the post helps please give a thumbs up
If it solves your issue, please accept it as the solution to help the other members find it more quickly.
Tharun