Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I would like to host powerbi.com inside of my asp.net website page. Specifically I want to do this so that users can create, edit, etc their reports and dashboards starting from within my website url. I tried using iframe and embed elements but both give me the error "The content cannot be displayed in a frame". Is this simply not possible?
If this is not possible is it possible to embed a report or dataset and also enable the toolbar to show so that users can edit the report or dataset?
Hi @davehchoi,
We can't use the embedded link in the iframe directly. We need to call powerbi.js like below. Please try and check out the demo here.
var txtAccessToken = $('#txtAccessToken').val(); var txtEmbedUrl = $('#txtReportEmbed').val(); var txtEmbedReportId = $('#txtEmbedReportId').val(); var tokenType = $('input:radio[name=tokenType]:checked').val(); var models = window['powerbi-client'].models; var permissions = models.Permissions.All; var config= { type: 'report', tokenType: tokenType == '0' ? models.TokenType.Aad : models.TokenType.Embed, accessToken: txtAccessToken, embedUrl: txtEmbedUrl, id: txtEmbedReportId, permissions: permissions, settings: { filterPaneEnabled: true, navContentPaneEnabled: true } }; var embedContainer = $('#embedContainer')[0]; var report = powerbi.embed(embedContainer, config);
Best Regards,
Dale
Thanks but this seems to embed reports or dashboards. I'm looking to embed the entire app so that users can actually create or edit reports and dashboards.
Hi @davehchoi,
Usually, we can do it by adding it in an iframe. But I'm afraid that isn't available. Please refer to the snapshot below.
Best Regards,
Dale
User | Count |
---|---|
5 | |
4 | |
4 | |
2 | |
2 |
User | Count |
---|---|
8 | |
6 | |
4 | |
4 | |
4 |