Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I'm attempting to connect to a TDS Endpoint (Dataverse) read only sql database. I've done my query and put it into power bi.
This refreshes fine locally but gives me below when I'm attempting to refresh on the gateway/service.
Microsoft SQL: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
How could it be the correct server locally and not on the service?
Thanks
Solved! Go to Solution.
Hi @lherbert501,
Thanks for reaching fabric commuinity. will always happy to answer. It seems issue with the connection configuration for this endpoint. Can you please look at below things.
Why it works locally but not on the service
When you refresh locally, Power BI Desktop uses your machine's credentials and network directly. When refreshing via the Power BI Service/Gateway, it routes through the gateway machine, which has a different network context.
Root Causes & Fixes
The error explicitly says Named Pipes Provider, error: 40. The gateway needs to connect via TCP/IP, not Named Pipes.
For Dataverse, your connection string should use the org's TDS endpoint URL format:
Ex- yourenvironment.crm.dynamics.com, 5558
Make sure the gateway machine can resolve and reach this hostname on port 5558.
The gateway server may be blocking outbound port 5558. Verify that:
Dataverse TDS requires Azure AD (OAuth) authentication. In Power BI Service, go to:
Dataset Settings → Data source credentials → Edit credentials → Set authentication to OAuth2
Ensure your gateway is up to date, older versions had known issues with Dataverse TDS. Download the latest from Microsoft.
Quick checklist
Check | Action |
Port 5558 open on gateway? | Test with telnet yourenvironment.crm.dynamics.com 5558 |
OAuth2 set in Power BI Service? | Dataset → Settings → Credentials |
Gateway updated? | Download latest version |
TCP/IP enabled on gateway machine? | SQL Server Config Manager / Please try to connect the SQL read |
The most common fix for this specific error is setting OAuth2 credentials in the Power BI Service for the Dataverse data source.
Hope these can help to fix your issue. Please consider this post as eccepted solution if helps.
Hi @lherbert501,
Thanks for reaching fabric commuinity. will always happy to answer. It seems issue with the connection configuration for this endpoint. Can you please look at below things.
Why it works locally but not on the service
When you refresh locally, Power BI Desktop uses your machine's credentials and network directly. When refreshing via the Power BI Service/Gateway, it routes through the gateway machine, which has a different network context.
Root Causes & Fixes
The error explicitly says Named Pipes Provider, error: 40. The gateway needs to connect via TCP/IP, not Named Pipes.
For Dataverse, your connection string should use the org's TDS endpoint URL format:
Ex- yourenvironment.crm.dynamics.com, 5558
Make sure the gateway machine can resolve and reach this hostname on port 5558.
The gateway server may be blocking outbound port 5558. Verify that:
Dataverse TDS requires Azure AD (OAuth) authentication. In Power BI Service, go to:
Dataset Settings → Data source credentials → Edit credentials → Set authentication to OAuth2
Ensure your gateway is up to date, older versions had known issues with Dataverse TDS. Download the latest from Microsoft.
Quick checklist
Check | Action |
Port 5558 open on gateway? | Test with telnet yourenvironment.crm.dynamics.com 5558 |
OAuth2 set in Power BI Service? | Dataset → Settings → Credentials |
Gateway updated? | Download latest version |
TCP/IP enabled on gateway machine? | SQL Server Config Manager / Please try to connect the SQL read |
The most common fix for this specific error is setting OAuth2 credentials in the Power BI Service for the Dataverse data source.
Hope these can help to fix your issue. Please consider this post as eccepted solution if helps.
Hello
I’m not completely sure, but this usually happens when the gateway can’t reach the same endpoint your local machine can, even if it works fine on your side, often it’s a network or DNS issue rather than the query itself. I’d check if the gateway machine can resolve and access the TDS endpoint, maybe try connecting from that server directly, also verify firewall rules, ports, and that the connection is using the right auth method in the service, sometimes switching from named pipes to TCP/IP or using the full server URL helps. If it’s Dataverse, also double check that TDS is enabled and allowed for external connections, and that the gateway is updated.
Best regards,
Daniele
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 31 | |
| 23 |