Forum Discussion

DirkVr's avatar
DirkVr
Frequent Visitor
3 years ago
Solved

Failed loading report when using Power BI Embedded : error 403

I started by looking at the AppOwnsDataStarterKit. I have incorporated the AppOwnsWebApi in our own back-end. I have created there a end-point which which I could retrieve the datamodel of a service priccipal profile (Get EmbeddedViewModel) 

Our front-end is built using Angular. In this Angular application I am calling the endpoint "Get EmbeddedViewModel)" (which nicely gives back a list of reports and also an embedtoken. This info is used to fill in the EmbedReportConfiguration. I am only interested in the first report.

       this._powerBIServiceProxy.retrieveEmbeddedModel().subscribe(vm => {this.viewModel = vm
            var report = this.viewModel.reports[0];
            this.reportConfig = {
                type: 'report',
                id: report.id,
                embedUrl: report.embedUrl,
                accessToken: this.viewModel.embedToken,
                tokenType: models.TokenType.Embed,
                permissions: models.Permissions.Read,
                viewMode: models.ViewMode.View,
                settings: {
                  layoutType: models.LayoutType.Master,
                  background: models.BackgroundType.Transparent,
                  panes: {
                    filters: { visible: false },
                    pageNavigation: { visible: true, position: models.PageNavigationPosition.Left }
                  }
                }
            }
 
When executing this code, I am getting an error message like this

 

I was hoping to see some more info in the technicalDetails, but... bad luck:-)

 

Any ideas what I could be doing wrong?

 
  • Problem is solved. Issues was that the embed token was not correctly filled with the reports that I wanted to load. 

5 Replies