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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Integrate Power BI report (deployed in service) in web app in Edit mode

Hi All,

 

I am able to display a Power BI embedded report in Edit mode following the steps at https://docs.microsoft.com/en-us/azure/power-bi-embedded/power-bi-embedded-save-reports

 

I would like to do similar activity using Power BI report deployed in service. I am able to integrate a Power BI report into web app following the steps at https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-integrate-report/. This opens the report in View mode. Please note that I have tried to used the settings used in Power BI embedded but it does not work with the report deployed in service.

 

Please let me know of how I can integrate the Power BI report in Edit mode.

 

Thanks in advance.

 

Thanks,

Vinayak 

4 REPLIES 4
Eric_Zhang
Microsoft Employee
Microsoft Employee


@Anonymous wrote:

Hi All,

 

I am able to display a Power BI embedded report in Edit mode following the steps at https://docs.microsoft.com/en-us/azure/power-bi-embedded/power-bi-embedded-save-reports

 

I would like to do similar activity using Power BI report deployed in service. I am able to integrate a Power BI report into web app following the steps at https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-integrate-report/. This opens the report in View mode. Please note that I have tried to used the settings used in Power BI embedded but it does not work with the report deployed in service.

 

Please let me know of how I can integrate the Power BI report in Edit mode.

 

Thanks in advance.

 

Thanks,

Vinayak 


@Anonymous

A simple demo is as below. For more completed demo, check embed-a-report-into-an-app.

 

<html>

 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"></script>

<script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"></script>
 
<script type="text/javascript">
function clickToEmbeded(){
 
var token =   $('#accesstoken').val();
var embedUrl =  $('#embedUrl').val();


var embedConfiguration = {
    type: 'report',
	//replace your token here
    accessToken: token, 
	//replace your embedUrl here
    embedUrl: embedUrl 

}; 
 

var $reportContainer = $('#reportContainer');
 
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);


}

</script>
   Paste your access Token:  <input id='accesstoken' type="text" name="fname"><br>
   Paste the embedUrl: <input id='embedUrl' type="text" name="lname"><br>
<button type="button" onclick="clickToEmbeded()" >  click me to embed </button>
 
<div id="reportContainer" style="width:1600;height:900" ></div>

</html>

 

Anonymous
Not applicable

Hi @Eric_Zhang

 

I am able to open the report deployed in service in Edit mode.

However when I click on File -> Save option, I am getting the below error.

 

Something went wrong
 
Unable to save the report
Please verify you have the right permissions or contact support. If you contact support, please provide these details.
 
I believe this is because of the access token generated has 'Read' permission instead of 'Read Write' permission.
 
The code to generate token is,
AuthenticationResult AR = AC.AcquireTokenByAuthorizationCode(code, new Uri(redirectUri), cc);
 
which should be changed to generate Read-Write token.
 
The code to generate Read - Write token in Embedded approach is 
var embedToken = PowerBIToken.CreateReportEmbedToken(this.workspaceCollection, this.workspaceId, report.Id, null, null, "Report.ReadWrite")
 
Please suggest.
 
Thanks,
Vinayak
 
 

@Anonymous

I'm not quite sure where you do this operation " I click on File -> Save option", could you be more specific with a snapshot?

Anonymous
Not applicable

Thank you @Eric_Zhang

 

I will try it out and let you know.

 

Thanks,

Vinayak

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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