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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
marcobaciga
Helper I
Helper I

Error website javascript

Hi, i have done a website in javascript where i put into a PowerBI report.

When i run the website i receive this mistake:

 

https://df-msit-scus-redirect.analysis.windows.net/metadata/cluster Forbidden 403

 

        var embedConfiguration = {
            type: 'report',
            accessToken: access_token,
            id: '73ebfbec-7cxxxxx08638c90',
             embedUrl: 'https://msit.powerbi.com/reportEmbed'
        };

 

what can i do?

 

Thank you

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee

@marcobaciga

Ensure that the token is not expired. I test with a html and it works.

For your reference.

 

<html>

 <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 embedConfiguration = {
    type: 'report',
    accessToken: ' a valid token',    
	id: 'd99e763f-1dae-4xxxx1-d958313fd3f8',
    embedUrl: 'https://app.powerbi.com/reportEmbed?reportId=d99e763fxxxae-4xxxx313fd3f8' 

}; 
 

var $reportContainer = $('#reportContainer');
 
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);

<!--validateReportLoad incorrectly returns schema errors for valid filters #16https://github.com/Microsoft/powerbi-models/issues/16-->

report.on('loaded', function() {
console.log('report.on - loaded');
});

}
</script>

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

</html>

 

For testing purpose, you can get a token in a quick way following this thread.  

View solution in original post

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee

@marcobaciga

Ensure that the token is not expired. I test with a html and it works.

For your reference.

 

<html>

 <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 embedConfiguration = {
    type: 'report',
    accessToken: ' a valid token',    
	id: 'd99e763f-1dae-4xxxx1-d958313fd3f8',
    embedUrl: 'https://app.powerbi.com/reportEmbed?reportId=d99e763fxxxae-4xxxx313fd3f8' 

}; 
 

var $reportContainer = $('#reportContainer');
 
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);

<!--validateReportLoad incorrectly returns schema errors for valid filters #16https://github.com/Microsoft/powerbi-models/issues/16-->

report.on('loaded', function() {
console.log('report.on - loaded');
});

}
</script>

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

</html>

 

For testing purpose, you can get a token in a quick way following this thread.  

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.