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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
threw001
Helper III
Helper III

DataSource.Error: The underlying connection was closed: An unexpected error occurred on a receive.

Hi,

 

I changed my device and i am getting the below error:

DataSource.Error: The underlying connection was closed: An unexpected error occurred on a receive. power query

 

I am only getting these errors on 2 queries. These queries are pulling data from:

http://worldtimeapi.org/api/

 

All other queries are fine which are pulling data from OneDrive

 

Please advise

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @threw001 

The connection to this API is public, so it should be set to Anonymous in Power BI.
If you are receiving the error:
DataSource.Error: The underlying connection was closed: An unexpected error occurred on a receive

Try the following steps:

1. Verify API Availability
Open http://worldtimeapi.org/api/ in your browser to confirm it is accessible.
If not, the issue might be with the API or your device/network settings.

2. Switch to HTTPS
Update the URL to https://worldtimeapi.org/api/ instead of http.
Some networks or devices block HTTP traffic.

3. Set Anonymous Access

Go to Power BI > File > Options and settings > Data Source Settings.
Locate the API connection and click Edit Permissions.
Set the authentication method to Anonymous and save.
Verify Query in Advanced Editor
4. Ensure the M code is correct:

let
Source = Json.Document(Web.Contents("http://worldtimeapi.org/api/"))
in
Source
5. Check Network Configuration
6.Ensure no firewall or antivirus is blocking the connection.

If none of these steps resolve the issue, the problem is outside of Power BI and likely related to the API itself.
In this case, it is recommended to contact the website’s support team for assistance.

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors