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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
azulcore
Frequent Visitor

Power BI Embed script does not work: This content isn't available. Learn more about Power BI.

I have created an embed token and obtained the embed URL and report ID. I plug in all the information into the JavaScript Demo site (https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html#) and all works well everytime. But now I am trying to put it into an HTML file to see it run via my own scipt but I get: This content isn't available. Learn more about Power BI.

 

Also, I have a clientid and clientsecret when I creat my codes, not sure if that make a difference then just using a clientid

 

Below is the script I am using:

 
<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: '[Embed Token]',
embedUrl: '[URL]',
id:'[report id]',
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: false
} };
var $reportContainer = $('#dashboardContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);
}

function reloadreport(){
var element = $('#dashboardContainer');
alert(element);
var report = powerbi.get(element);
report.reload().catch(error => {console.log(error) });
};
</script>
<div id="dashboardContainer">
</div>
</html>
 

 

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @azulcore,

 

According to my test, maybe you need to update the token that will expire in one hour.

Power_BI_Embed_script_does_not_work

 

 

Best Regards,

Dale

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @azulcore,

 

According to my test, maybe you need to update the token that will expire in one hour.

Power_BI_Embed_script_does_not_work

 

 

Best Regards,

Dale

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.