Forum Discussion
jstearnes
Advocate I
8 years agoCalling 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
Microsoft Employee
8 years agoHi 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
Advocate I
8 years agoAlso, using the embedUrl on it's own should result in some sort of error, not in the browser hanging with no feedback