Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Web.Contents failed to get data through Azure Function http call!

Hello Power BI Pros,

We call an azure function url via Web.Contents() method as following:

    Source = (CustomerGuid as text) => let
       Source = Json.Document(
               [RelativePath = CustomerGuid] 
        ) in Source

It works fine, but with some certain datasets (usually larger ones), I could refresh and get all the data in the Power Query Editor (Transform data) but in the power bi desktop itself I get this error:



The reason is not obvious specially that when we call the azure function with the same customer guid it works and returns the data correctly!

Thank you in advance for your help ❤️

Community Support
Community Support

Hi @walid140891 ,

Please refer to past solutions.


(502): Bad Gateway:

Solved: Connecting to Application Insights: Bad Gateway Er...

(500): Internal Server Error:

Solved: File too big to import from online source- (500): ...


Best Regards,

Community Support Team


If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Hi @v-cgao-msft ,

Thank you for your response, it's mentioned that 502 bad gateway issue is related to the fact that the query returns too much data, however we use power bi for showing incretemntally saved data, that means we need all the historical data and we cannot limit the refresh time frame!

Helpful resources

Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors