cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
daveParso
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
Highlighted
daveParso
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
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.

daveParso
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.

Highlighted
daveParso
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
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.