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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.