Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Power Bi Embedded - Javascript API

Hello everybody,

I have followed the documentation: https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html

and used this package to embedded Power BI at my website: https://github.com/microsoft/PowerBI-JavaScript 

but i have a lot of problems like the image. It's works about one hour and after show me this error:

Screen Shot 2019-09-18 at 5.21.01 PM.png

I have to generate other Access Token from Power Shell each time..

There is a way to make my website make a "transparent Sign In", sending user, password parameters to any service, api, route, etc?

I'm use Laravel.

My code is:

<html>
<div id="embedContainer"></div>
</html>
<script>
var EmbedUrlReport ='https://app.powerbi.com/reportEmbed?reportId=xxxxx';
var EmbedReportId= 'xxxxx';
var accessToken = 'xxxxzz';
var tokenTypeReport = 1;
var models = window['powerbi-client'].models;
var permissions = models.Permissions.All;
var config ={
 type: 'report',
tokenType: tokenTypeReport == '1' ? models.TokenType.Aad :models.TokenType.Embed,
accessToken: accessToken,
 embedUrl: EmbedUrlReport,
 id:EmbedReportId,
 permissions: permissions,
 settings: {
 filterPaneEnabled: true,
 navContentPaneEnabled: true
 }
var embedContainer = $('#embedContainer')[0];
var report =powerbi.embed(embedContainer, config);
</script>

I didn't understand the purpose of azure's service.
Why is complicated make a simple security embedded? Why don't to make a simple API sending user and password of Power BI and returning OK or Error?

2 REPLIES 2
Jayendran
Solution Sage
Solution Sage
marciofornari
New Member

Your problem is my problem too Smiley Frustrated

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.