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
DirkVr
Frequent Visitor

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
DirkVr_0-1665143094453.png

 

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

 

Any ideas what I could be doing wrong?

 
1 ACCEPTED SOLUTION
DirkVr
Frequent Visitor

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

View solution in original post

4 REPLIES 4
DirkVr
Frequent Visitor

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

v-shex-msft
Community Support
Community Support

Hi @DirkVr,

AFAIK, the HTTP 403 Forbidden response status code indicates that the server understands the request but refuses to authorize it.

I'd like to suggest you extract the id of the embedded contents and corresponding tokens to test on the power bi embedded playground to confirm if the same issue appears:
Power BI Embedded Playground

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi,

 

I have tried it on the Power BI Embedded Playground and i get the same issue.

DirkVr
Frequent Visitor

Update : when looking at the requests going out, I see that the following request is giving a 403 : 

https://wabi-west-europe-d-primary-redirect.analysis.windows.net/explore/reports/4eac0570-d331-4847-...

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.

Top Kudoed Authors