-
Notifications
You must be signed in to change notification settings - Fork 472
Embedding Basics Using Azure Power BI Embedded (Deprecated)
Amit Shuster edited this page Jan 24, 2021
·
3 revisions
ℹ️ This wiki has been deprecated |
---|
All our Client APIs documentation and references can be found in the new Power BI embedded analytics Client APIs documentation set. |
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.