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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
guillaumevi
Regular Visitor

PowerBI embed JS not rendering

Hello all,

 

I am trying to embed a PBI report using the JS embedding library, below is the code I am using.

My issue is that the report is not rendering at all (NB. Iframe is properly created by the library) and I got no error either ...

To get the AD Token i followed the steps describe here (Power-BI-Rest-Api-with-the-ADAL-JS-library)

 

What am I missing ?

<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"></script>

<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"></script>
 
<script type="text/javascript">
window.onload = function () {  


var clientname = ["powerbi"]; 
 
 
    // Read embed application token from Model
    var accessToken = "ey...gw";

    // Read embed URL from Model
    var embedUrl = "https://app.powerbi.com/reportEmbed?reportId=1c6a04eb-XXXX&groupId=120870e4-BBBB";

    // Read report Id from Model
    var embedReportId = "1c6a04eb-XXXX";

    // Get models. models contains enums that can be used.
    var models = window['powerbi-client'].models;

  
    var embedConfiguration = {
        type: 'report',
        tokenType: models.TokenType.Aad,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,
        permissions: models.Permissions.All,
        settings: {
            //filterPaneEnabled: true,
            navContentPaneEnabled: true
        }
    };
  
var $reportContainer = $('#reportContainer');
 
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);
 
} 
</script>

<div id="reportContainer" powerbi-settings-nav-content-pane-enabled="true"   powerbi-settings-filter-pane-enabled="true"></div>

</html>
</div>
3 REPLIES 3
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @guillaumevi,

 

A little weird! I just verified the code above. And it just works all fine for me without any issue(the report renders successfully). 

 

As there is no any error for troubleshooting, I would suggest you use fiddler to investigate further. Smiley Happy

Reference: https://docs.microsoft.com/en-us/power-bi/developer/embedded-troubleshoot 

 

Regards

Hi @v-ljerr-msft thanks for your quick reply !

I looked at it, this is very weird, I get a "307 Internal Redirect" feedback from the https://app.powerbi.com/reportEmbed

Any idea why ?

Further investigation led to test with IE.... and it worked perfectly, subsequent analysis is that the issue stands with Chrome, any idea on a way to solve this as we have to support especially Chrome ?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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