Forum Discussion
R visual not displaying after embedding
Hi katie_pbi
The possible cause of this error usually indicates permission issues, unsupported environment settings for R visuals, or limitations in execution within the embedded token or tenant.
For your case with R visuals working in Power BI Service but not after embedding via API on a website with token-based auth, Please check the following :
-
Confirm that the embedding token has the required permissions to execute R visuals in the report.
-
Ensure the Power BI workspace is assigned to a Premium capacity that supports R visuals.
-
Check your tenant settings and admin portal to verify that R visuals are enabled for your organization.
-
Use only supported R packages like ggplot2, and ensure scripts complete under 20 seconds.
-
Verify that the embedding method supports R visuals โ avoid using "Publish to web" since it disables R visuals for security.
-
If limitations persist, consider exporting R visuals as static images and embed those instead as a workaround.
๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together!
Hi,
Thanks for you reply grazitti_sapna !
I got a similar suggestion from Copilot but it didn't allow me to find a solution, just re-confirmed the visuals seem to comply with requirements. Like I wrote, these R visuals work correctly in PBI Service and are hosted in a premium capacity, so points 2 & 3 are already covered.
As for point 4 - my test visual is only a single value and ggplot2 lib - it cannot execute over 20 seconds. Security is handled with a token so it's also not 5.
Regarding 1 - the web devs added to the token "loadRVisuals: true" suggested by Copilot but it made no difference - do you have any other details from documentation? I haven't been ablo to find it at all.
Exporting as static images is what we do consider as a workaround but it is really not a solution of the problem and I still can't understand why these visuals do no work ๐