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
jamesdales
Kudo Kingpin
Kudo Kingpin

JavaScript API: Custom visuals not rendering

I'm having a problem rendering reports with custom visuals using the JavaScript API. The report is hosted in the Power BI service, rather than Power BI Embedded.

 

The rest of the report renders fine. Custom visuals however do not appear and I get a 401 error:

 pbierror1.png

 

 

 

 

 

 

I then open the same report from within in the Power BI service and then refresh it. Then when I return to my page with the embedded report, and refresh it, everything renders successfully.

 

Please could someone help?

 

Thanks

 

James

8 REPLIES 8
mikihiir
Helper III
Helper III

Discovered smth else. When you first open your visual in powerbi.com (visual cashed) and then open same visual through javascript api, then this rendering problem does not occure. If u clear cache and try to open your custom visual again then visual is not rendered. You get bunch of unauthorized errors.

mikihiir
Helper III
Helper III

Seems , that this problem occures when using PowerBI.com(url="https://app.powerbi.com/reportEmbed").

 When uploading power bi visual solution to Azure (Power BI Embedded (Azure) url="https://embedded.powerbi.com/appTokenReportEmbed"))

, then these error do not appear and visual is loaded. strange ...

Eric_Zhang
Microsoft Employee
Microsoft Employee

@jamesdales

What is the custom visual in your case? At the moment I post, the custom visuals such as Pyramid 3D Chart, Tachometer can be rendered well when embeded.

It affects a number of bespoke custom visuals created using the Custom Visuals API.

 

I'm not suprised custom visuals from the gallery render correctly as aren't these whitelisted in the service and treated differently?

@jamesdales

Could you share any custom visual that can reproduce the problem?

 

this problem occurs with every custom visual. u can try with Liquid Fill Gauge, download it from visual gallery

GianniB
Frequent Visitor

Yesterday (some other day, too) I had the same problem with a custom R visual.

Sometimes it works with a browser but doesn't with a different one. Now it's working with both Chrome and Firefox but not in Edge (HTTP401: access denied)

mikihiir
Helper III
Helper III

Hi have have the sames issue, custom visuals not rendering, i also have similar errors

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.