Skip to content

Embedding Basics Using Azure Power BI Embedded (Deprecated)

ali-hamud edited this page Jun 13, 2017 · 3 revisions

Power BI Azure Embedded - Deprecated

When using Power BI Embedded, the tokens issued are for a specific report, and the token should be associated with the embed URL on the same element to ensure each has a unique token. This allows embedding multiple reports using the same service instance.

Provide an embed configuration using attributes:

<div
	powerbi-type="report"
	powerbi-access-token="eyJ0eXAiO...Qron7qYpY9MI"
	powerbi-report-id="5dac7a4a-4452-46b3-99f6-a25915e0fe55"
	powerbi-embed-url="https://embedded.powerbi.com/appTokenReportEmbed"
></div>

Embed using javascript:

<div id="reportContainer"></div>
var embedConfiguration = {
	type: 'report',
	accessToken: 'eyJ0eXAiO...Qron7qYpY9MI',
	id: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
	embedUrl: 'https://embedded.powerbi.com/appTokenReportEmbed'
};
var $reportContainer = $('#reportContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);

Notice how the attributes and embed configuration hold the same data, just provided to the service in different ways.

Clone this wiki locally