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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Prashanthi_sai
New Member

Refused to display localhost in a frame because it set X-Frame-Options to deny

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.

1 REPLY 1
Anonymous
Not applicable

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.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors