cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

How to embed a PBI report into our web app where data is in SSAS

 

Under File directory, we couldnt find "Publish to Web" option. Is it because we prefered "online" connection option?

 

We try to get report from a web (php) application; as guided in this link

* We registered our app in Azure AD. We coded in our PHP webapp.

* We got the authorization code and acess token.

* We got the report list over PBI API with the response for report id and embed url.

 

We cannot fetch data from embed url. What may be the possible cause?

 

We also tried to test over here; but since we coulnt figure outthe embed code; we couldnt test over there? How to find the embed code?

1 REPLY 1
Highlighted
Microsoft
Microsoft

Re: How to embed a PBI report into our web app where data is in SSAS


@umutgulac wrote:

 

Under File directory, we couldnt find "Publish to Web" option. Is it because we prefered "online" connection option?

 

We try to get report from a web (php) application; as guided in this link

* We registered our app in Azure AD. We coded in our PHP webapp.

* We got the authorization code and acess token.

* We got the report list over PBI API with the response for report id and embed url.

 

We cannot fetch data from embed url. What may be the possible cause?

 

We also tried to test over here; but since we coulnt figure outthe embed code; we couldnt test over there? How to find the embed code?


@umutgulac

The here link is a demo of Power BI Javascript for Power BI Embedded. However you can still apply the Javascript API to embed the reports from Power BI Service in your case. Since you've figured out how to get the accesstoken and embed url, to embed a report with them, you can reference below html demo.

 

<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">
window.onload = function () {  
 

var embedConfiguration = {
    type: 'report',
	//replace your token here
    accessToken: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJ.................BwzM733Q',
	
	//replace your reportid here
	id: '057f230b-015e-4c86-ac98-55e82baf363a',
	//replace your embedUrl here
    embedUrl: 'https://app.powerbi.com/reportEmbed?reportId=057f230b-015e-4c86-ac98-55e82baf363a' 

}; 
 

var $reportContainer = $('#reportContainer');
 
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);
 
}
</script>

<div id="reportContainer" ></div>

</html>

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.