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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I took the controller code from the sample projects into spring boot application and added an html to embed report but getting this error at powerbi.embed().
When i checked over internet it was saying this is something set by the source.
Hi @Prashanthi_sai ,
There are some possible causes and solutions for this error:
You may have an invalid or expired access token for embedding the report. You need to generate a valid access token using the Power BI REST API or the Power BI SDK for Java.
You may have an incorrect or mismatched report ID, group ID, or workspace ID in your embed code. You need to make sure that you are using the correct IDs for the report and the workspace that you want to embed.
You may have insufficient permissions or roles to embed the report. You need to have at least the Viewer role in the workspace that contains the report, or have Reshare permissions, to embed the report. You can check your role and permissions in the Power BI service or the Azure portal.
You may have a firewall or proxy issue that blocks the communication between your application and the Power BI service. You need to configure your firewall or proxy settings to allow access to the Power BI domains and ports.
Troubleshoot Power BI embedded analytics application - Power BI | Microsoft Learn
How to troubleshoot and debug your embedding code in Power BI embedded analytics | Microsoft Learn
Troubleshoot the Power BI add-in for PowerPoint - Power BI | Microsoft Learn
c# - unauthorized error 401 for power reports embedding - Stack Overflow
If I have misunderstood your meaning , please provide more details.
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.