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.

Reply
Anonymous
Not applicable

custom visual, Iframe content not showing

Hi.

I have a custom visual with an IFrame that displays a Asp mvc web page.

When I create a report in PowerBI.com, add the custom visual and sett the URL property.

This reports shows my asp mvc web page within the IFrame. Meaning both the visual iframe and the iframe within the visual.

 

When I create the same report in the PowerBI desktop application. Import my custom visual, set the data source and url. Publish my report to PowerBI.com. This report does not show my iframe within the visual. 

The div id="sandbox-host" within the visual iframe is there. But this div have no content.

 

Generated by PowerBI desktop, empty div

<div id="sandbox-host" class="visual visual-aeMicroFunctionVisual12078836E25D45F39A1999F2BD75F237"></div>

 

Generated by PowerBI.com

<div id="sandbox-host" class="visual visual-aeMicroFunctionVisual12078836E25D45F39A1999F2BD75F237">
<iframe src="https://XXXXXXXXXXXXXXXXXXXXXXXXXXX707057500079987300" style="width: 260px; height: 244px;">
</iframe>
</div>

 

What I can se is that my property within my visual is listed in the javascript for my custom visual

<script id="js-aeMicroFunctionVisual12078836E25D45F39A1999F2BD75F237" name="aeMicroFunctionVisual12078836E25D45F39A1999F2BD75F237">

...

I don't get any javascript errors when viewing my report.

 

So how can I get a report generated by PowerBi desktop to view the content of my IFrame?

 

Regards

/Frode

1 ACCEPTED SOLUTION
v-viig
Community Champion
Community Champion

It seems Power BI Desktop blocks an iframe inside another ifframe due to using sandboxed iframe.

To bypass this issue we would recommend not to use an additional iframe.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

5 REPLIES 5
v-viig
Community Champion
Community Champion

It seems Power BI Desktop blocks an iframe inside another ifframe due to using sandboxed iframe.

To bypass this issue we would recommend not to use an additional iframe.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Anonymous
Not applicable

Is it possible to set the source of the outer iframe, the visual in it self?

v-viig
Community Champion
Community Champion

No, it is not possbile due to security concerns.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

I am observing the following in a custom visualization packaged as PBIVIZ:

 

1) My custom component includes a single Iframe.

2) The PBIVIZ installs and renders partially in PowerBI desktop.  The IFrame does not load (fiddler can't see a URI request at all).

3) When published to PBI server, the same component renders fully, including the IFrame correctly.

 

A few questions:


1) Is this true?  By design?

2) Is there a work-around such as embedding the IFrame in SVG or elsewhere?

 

Thank you!

Hello,

 

1.  It is not recommended to use iframes inside your visual because visual is wrapped into iframe with sandbox itself and inner iframes will not work correctly.

2. There aren't workarounds.

 

In fact, it is strange why your visual works correctly in Service. Could you please send us to  pbicvsupport@microsoft.com your code or link to a repo for analysis? 

 

Kind Regards,

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors