Forum Discussion
jstearnes
8 years agoAdvocate I
Calling embedUrl in browser hangs
I have retrieved a list of reports from the REST API - https://msdn.microsoft.com/en-us/library/mt634543.aspx and I have tried using the embedUrl in my broswer but it just hangs, there are no network...
v-ljerr-msft
8 years agoMicrosoft Employee
Hi jstearnes,
The embedUrl cannot be directly used in browser. You'll need to do some coding(js, C#, and so on) to consume the embedUrl for embedding. The sample code below is written with PowerBI-JavaScript api. You can refer this article for more details. :smileyhappy:
// Get models. models contains enums that can be used.
var models = window['powerbi-client'].models;
var embedConfiguration = {
type: 'report',
id: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
embedUrl: 'https://app.powerbi.com/reportEmbed',
tokenType: models.TokenType.Embed,
accessToken: 'h4...rf'
};
var $reportContainer = $('#reportContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);
Regards
jstearnes
8 years agoAdvocate I
Hi v-ljerr-msft any additional help would be greatly appreciated