cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
daveParso Frequent Visitor
Frequent Visitor

POST 403(forbidden) after dashboard has been embedded

I'm using an app owns data setup with power BI embedded and have added functionality for switching between and refreshing dashboards. However after the first embed of a dashboard i am confronted with 4 POST 403 errors in chrome console and after this any refresh or switch just leaves a blank dashboard. below is an image that is representative of what is in the console after the first embed:

To be clear the first embed works fine and the dashboard is visible as expected but any subsequent attempts to change or refresh leave me with a blank screen

1 ACCEPTED SOLUTION

Accepted Solutions
daveParso Frequent Visitor
Frequent Visitor

Re: POST 403(forbidden) after dashboard has been embedded

So its a little bit of a hack but i managed to get rid of the unauthorized errors by doing embedURL.replace("https://app", "https://msit") still unsure why requesting the url feeds back app but hey this got rid of the errors. However this hasnt actually changed the fact that running powerbi.embed again leaves me with a blank dashboard instead of refreshing like it does for reports. At this point I have given up on automatic refreshes for dashboards. switching between dashboards works now at the very least so I'm going to mark this as the solution unless anything better is posted.

View solution in original post

3 REPLIES 3
Microsoft Eric_Zhang
Microsoft

Re: POST 403(forbidden) after dashboard has been embedded


@daveParso wrote:

I'm using an app owns data setup with power BI embedded and have added functionality for switching between and refreshing dashboards. However after the first embed of a dashboard i am confronted with 4 POST 403 errors in chrome console and after this any refresh or switch just leaves a blank dashboard. below is an image that is representative of what is in the console after the first embed:

To be clear the first embed works fine and the dashboard is visible as expected but any subsequent attempts to change or refresh leave me with a blank screen


@daveParso

I'm not able to produce this issue. To exclude the cause from your code, could you try to embed with the attached html file? If the error still exists, please fiddler the network traffic when refreshing and submit a support ticket with the trace file.

Highlighted
daveParso Frequent Visitor
Frequent Visitor

Re: POST 403(forbidden) after dashboard has been embedded

So the embed worked fine in the attached html file. The one difference i noticed between the two was i was using https://app.powerbi.com/dashboardEmbed? in my embed url where as the html file you provided used https://msit.powerbi.com/dashboardEmbed? However if I modify my embed url to include msit instead of api I get "an invalid status code NotFound". Its also curious to me that my report embedding works just fine with app without throwing the error that dashboards are.

 

Edit:

After some more digging i have found that using dashboard.embedUrl in the controller is returning the https://app.powerbi.com link however if i replace this by hardcoding in the msit one it works fine. as far as im aware though i dont have any control over what that value is so is there some way for me to change this as obviously hardcoding in what dashboard is displayed is not suitbale for the overall product.

daveParso Frequent Visitor
Frequent Visitor

Re: POST 403(forbidden) after dashboard has been embedded

So its a little bit of a hack but i managed to get rid of the unauthorized errors by doing embedURL.replace("https://app", "https://msit") still unsure why requesting the url feeds back app but hey this got rid of the errors. However this hasnt actually changed the fact that running powerbi.embed again leaves me with a blank dashboard instead of refreshing like it does for reports. At this point I have given up on automatic refreshes for dashboards. switching between dashboards works now at the very least so I'm going to mark this as the solution unless anything better is posted.

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors