Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Pranoti98
Frequent Visitor

refresh error :Web.Contents failed to get contents... (502): Bad Gateway

I've been using Power BI to connect to data collected via the KoBoToolbox API (https://kf.kobotoolbox.org). Everything was working smoothly until recently, when I started facing persistent refresh failures both in Power BI Desktop and the Power BI Service. In Desktop, the queries show errors like:
Web.Contents failed to get contents... (502): Bad Gateway and Unable to read data from the transport connection: The connection was closed.

In the Power BI Service, although the data source connections show as successful, the scheduled refresh fails with a generic “internal service error”, and occasionally a message saying:

"The last refresh attempt failed because of an internal service error. This is usually a transient issue. If you try again later and still see this message, contact support."

I suspect this is due to large data payloads or API throttling from KoBoToolbox. I’ve tried manually refreshing and even chunking data through pagination, but it’s still slow and unreliable. Has anyone else experienced something similar with KoBo or other API-based JSON endpoints in Power BI?

1 ACCEPTED SOLUTION
v-tsaipranay
Community Support
Community Support

Hi @Pranoti98 ,

Thank you for reaching out to the Microsoft fabric community forum. Thank you @amitchandak and @rohit1991  for your response.

 

You don’t have to rebuild your report. Keep all visuals and measures. Just change the source so the API data is first saved to a stable location (SharePoint, OneDrive, Dataverse, Azure, etc.) and then connect Power BI to that stored file/table. This avoids throttling and gives reliable refresh.
Also let me know as @amitchandak mentioned have you raised the issue in issues forum?

 

Thank you.

View solution in original post

6 REPLIES 6
v-tsaipranay
Community Support
Community Support

Hi @Pranoti98 ,

 

Could you please confirm if the issue has been resolved through the raising issue in issues forum? If the issue has been resolved, we kindly request you to share the resolution or key insights here to help others in the community.

Please feel free to contact us if you have any further questions.

 

Thank you.

v-tsaipranay
Community Support
Community Support

Hi @Pranoti98 ,

Thank you for reaching out to the Microsoft fabric community forum. Thank you @amitchandak and @rohit1991  for your response.

 

You don’t have to rebuild your report. Keep all visuals and measures. Just change the source so the API data is first saved to a stable location (SharePoint, OneDrive, Dataverse, Azure, etc.) and then connect Power BI to that stored file/table. This avoids throttling and gives reliable refresh.
Also let me know as @amitchandak mentioned have you raised the issue in issues forum?

 

Thank you.

rohit1991
Super User
Super User

Hii @Pranoti98 

 

Your Power BI configuration is fine  the refresh failure is happening because KoBoToolbox is timing out or throttling large requests, which causes these 502 errors. Splitting the data into smaller chunks plus retry logic is the most reliable fix. If the KoBo API keeps returning 502, the only stable workaround is: don’t connect Power BI directly >> store the API data somewhere reliable >> refresh from that source.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Hey Rohit,
Thanks for your reply.
thing is that i am working on this dahsboard since last 2 months, and i am worried if i do saves data to cloude/sharepoint and then access it from there, i need to do everything from start. 

Thanks

amitchandak
Super User
Super User

@Pranoti98 , 
Try the API URL with Postman or curl and see if you get the same error, if yes, issue with the source 
Try to find a suitable page or API limit per day for KoBo API limits
Try the same in Desktop and if work does not work on Service, then log an issue - https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Okay, I will give a try
Thanks

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors