Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
We are trying to embed a powerbi report in our website, but the call to https://app.powerbi.com being blocked by one of the security headers we have. Which is (Cross-Origin-Embedder-Policy)
I was wondering if there's a way to solve this issue without removing this policy
Thanks
Solved! Go to Solution.
Hi @Alex2000 ,
According to your description, this is the browser part of the configuration.
For more details, you can read related document.
Cross-Origin Embedder Policy - Report URI Documentation (report-uri.com)
Cross-Origin-Embedder-Policy - HTTP | MDN (mozilla.org)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
In the event that anyone else experiences this and has the same issue - be sure that you are using an "Embed Token" with the PowerBI embed() function, not an access token - even though the field name is accessToken. The CORS error I was receiving was ultimately caused by using the wrong token.
Hi @Alex2000 ,
According to your description, this is the browser part of the configuration.
For more details, you can read related document.
Cross-Origin Embedder Policy - Report URI Documentation (report-uri.com)
Cross-Origin-Embedder-Policy - HTTP | MDN (mozilla.org)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is not a solution at all. If the answer is that there is no way to get the Power BI React examples working apart from localhost, or changing browser settings, then that library is essentially unusable.
Is there no way to allow specific sites for CORS access to your Power BI reports? (this is a response header that Power BI has to set) I'm hoping we are just missing something simple.
Try localhost but HTTPS, in IIS using self-sign cert.
Ran into the same issue. Should PowerBI not be including the Access-Control-Allow-Origin header to allow it to be embedded via CORS or similalry via a CORP policy?
We are embedding PowerBI into a react app and followed this document: https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/powerbi-client-react
Have you found any answers to this? Seems to be lots of people with the question, but no answers at all.
Are the React-TS examples no longer valid? (as they don't work except on localhost which is basically useless if it doesn't scale up to an actual production deployment)