Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi All,
I am getting the below error when i try to use Power BI JS to hide some pages and filters of power bi report in power app portals.
The report is displaying perfectly but the javascript is not working and giving error in console.
Uncaught Error: You attempted to get an instance of powerbi component associated with element
title="Power BI report"></iframe> but there was no associated instance.
Below is my code
{% assign forums_sm = sitemarkers["Forums"] %}
<html>
<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"></script>
<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"></script>
{% powerbi authentication_type:"AAD" path:"MyPowerBIURL" %}
</html>
<script>
$(window).load(function() {
// get div container for powerbi report
var embedContainer = $(".powerbi")[0];
// get reference to the embedded report
var report = powerbi.get(embedContainer);
// register a function to execute when report will finish loading
report.on("loaded", function(){
// update existing setting of the reports
// you can disable only one page or both at the same time
report.updateSettings({
panes: {
filters :{
visible: false
},
pageNavigation:{
visible: false
}
}
}).catch(function (errors) {
console.log(errors);
});
})
});
</script>
Please help how i can get ride of this error.
I exactly followed same steps mentioned in msdn link. Please see link here
https://docs.microsoft.com/en-us/powerapps/maker/portals/admin/add-powerbi-report
Thank you
Hi Jay,
The initial issue got resolved. There are two reasons for the issue
The Liquid Tag
{% powerbi authentication_type:"AAD" path:"MyPowerBIURL" %}
Should be
{% powerbi authentication_type:"powerbiembedded " path:"MyPowerBIURL" %}
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.