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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

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

[email protected]

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

[email protected]

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

[email protected]

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  [email protected] your code or link to a repo for analysis? 

 

Kind Regards,

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.