Forum Discussion

db190Coding's avatar
db190Coding
Regular Visitor
4 years ago
Solved

Export Report in Group Timeout (500), but Forbidden Error (403) when using preferClientRouting=true

Hi together,

 

I'm trying to built a Python application, which first downloads the .pbix file from power BI Service and later refreshes the dataset, so that I can implment a automated snapshot and refresh process.

 

For refreshing and downloading I'm using the Power BI Rest API.

 

Everything works fine for small Reports, but on bigger ones, I get a response code 500 (timeout), when I'm using the Export Report in Group Rest method (https://docs.microsoft.com/en-us/rest/api/power-bi/reports/export-report-in-group)

 

The documentation says, that as a workaround, you should set the preferClientRouting parameter to true, which I tried to do by adding "?preferClientRouting=true" to the request.

 

But when I try to run this request, I get a error 403 (Forbidden)

 

It is exactly the same problem as described in this idea:

 

https://community.powerbi.com/t5/Issues/Bug-Export-Report-in-Group/idi-p/2175529

 

So my question is, if there is some kind of solution for this from Microsoft in the meanwhile?

 

Thanks a lot in advance and have a nice weekend.

 

Daniel

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi db190Coding ,

     

    Please check the offical blog to get more information about how to troubleshooting when API call returning 403.

    For reference: API call returning 403

    What is the capacity of the workspace where your report is located, Shared Capacity or Premium Capacity? 

    I checked an know issue with similar problem that when using Export to File REST API, API call returns a 500

    Its workaround is moving the workspace to Premium Gen2.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

5 Replies

  • You should be getting a 307, not a 403. 

     

    "If your request arrives at the wrong cluster, the Power BI service returns a 307 Temporary Redirect HTTP response. In such cases, you need to redirect your request to the new address specified in the response HTTPS Location header."

     

    Does your request work if you don't ask for the routing?

    • db190Coding's avatar
      db190Coding
      Regular Visitor

      Hi and thanks a lot for your support. Yes, without the Parameter, the request works, but in case of the Download of this pbix file, which has about 300 MB times out with response Code 500 after some time. For smaller files (I tested with a 90 MB file) it works without any issue.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi db190Coding ,

         

        Please check the offical blog to get more information about how to troubleshooting when API call returning 403.

        For reference: API call returning 403

        What is the capacity of the workspace where your report is located, Shared Capacity or Premium Capacity? 

        I checked an know issue with similar problem that when using Export to File REST API, API call returns a 500

        Its workaround is moving the workspace to Premium Gen2.

         

        Best Regards,
        Rico Zhou

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.