The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
All other queries are fine which are pulling data from OneDrive
Please advise
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.