Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48670

Re: Integration Power BI Desktop report to PHP application with PowerBI API

$
0
0

The core of embedding Power BI reports is using a <iframe> tag in a HTML page, I think it won't be a problem in PHP.

 

<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',  
    accessToken: 'eyJ0eXAiOiYOUR-TOKEN-HERE-pgVRA',
    embedUrl: 'https://app.powerbi.com/reportEmbed?reportId=9f841c40-b361-490b-8f08-01dd2b8e6645'  
}; 

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

} 

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

The accessToken can be generated via ADAL for .NET, check this github page. As to how to get the accessToken in PHP, it is actually out of the topic of this forum. I'd suggest you post your question in dedeciated Azure AD forum.


Viewing all articles
Browse latest Browse all 48670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>