Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

PowerBI Embedded X-Frame-Options ERROR

Hi, I'm using powerbi-service-js to embed reports to my costumers in my Angular 8 application. Until October 3rd, everything worked fine. I would log in to the url (https://login.microsoftonline.com/common/oauth2/token) and then make a request to the powerbi API to get the report token. But now, when using pbiService's embed function, I get the following error. I'm using DirectQuery to construct the report and Deploying the Application in Nginx on Docker.

 

Refused to display 'https://app.powerbi.com/tokenRefresh?ver=1570488013252' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

 

ERROR DOMException: Blocked a frame with origin "https://app.powerbi.com" from accessing a cross-origin frame.
at e.retryTokenRefresh (https://app.powerbi.com/13.0.10956.175/scripts/reportEmbed.min.js:1:2245948)
at e.onTokenRefreshLoad (https://app.powerbi.com/13.0.10956.175/scripts/reportEmbed.min.js:1:2245770)
at HTMLIFrameElement.document.getElementById.onload [as __zone_symbol__ON_PROPERTYload] (https://app.powerbi.com/13.0.10956.175/scripts/reportEmbed.min.js:1:2245299)
at HTMLIFrameElement.ct (https://app.powerbi.com/13.0.10956.175/scripts/reportembed.externals.bundle.min.js:1199:9502)

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @ped_sistemas

 

It looks like you are using a "secure publish to web embed mode" feature which has auto sign-in page part of the loading of embedded report then experience an issue accessing Power BI Embedded content. Right? 

 

It's a known issue listed in Support site, you can keep an eye on the status of this issue in Support site: 

q1.PNG

 

Best Regards,
Qiuyun Yu

MichaelJRogers
New Member

I've been seeing it off on and on since Monday and wasn't able to find anything about it until now.  

 

Thanks

dom99
Advocate V

Seems that the work-around only works for a period of time before the same problem re-occurs

longntbui
Regular Visitor

We have ran into the same issue in our NodeJS + ReactJS application. However, it seems to be working fine on our app that uses the .NET stack. Could someone please explain what is exactly causing this issue? Both of these applications use the same "powerbi-client" javascript library to embed report. The only difference is the backend technology uses to get the access token. I really don't understand why it works for one and not the other.

 

I have tried to use the following node modules to embed the report and they both have the same issue

 - https://www.npmjs.com/package/powerbi-report-component

 - https://www.npmjs.com/package/react-powerbi

 

I also tried to update powerbi-client https://www.npmjs.com/package/powerbi-client module to the latest version which is 2.10.1 and it is still the same.

ped_sistemas
Frequent Visitor

@v-qiuyu-msft  Okay, let me know if you guys find any solution.