Forum Discussion

Alex2000's avatar
Alex2000
New Member
4 years ago
Solved

How to embed powerbi report when having "Cross-Origin-Embedder-Policy"

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 

6 Replies

  • 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.

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Icon for Community Support rankCommunity Support

    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.

      • J-Cat's avatar
        J-Cat
        New Member

        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)

         

    • J-Cat's avatar
      J-Cat
      New Member

      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.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Try localhost but HTTPS, in IIS using self-sign cert.