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
alanperrott
New Member

'Status code 400' error when connecting SQL data source to on-prem gateway

I have a connection to a remote SQL server data-source which works OK in PBI Desktop. I can add the data-source to the gateway in 'Manage Geteways' and the connection is successful. However, when I try to use the on-prem gateway for my datasource it fails with the unhelpful error "Something went wrong...", and a status code of 400. I have restarted the gateway service several times to no avail. I have turned on 'additional logging' but that doesn't show anything. Can anyone suggest why this might be failing, or advise how I can get more diagnostics?  

Capture.JPG

21 REPLIES 21

Thanks for the support Xiaoxin.

 

I have been through the gateway logs with 'additional logging' enabled and there are no errors reported.

 

I have installed Fiddler on the server - I presume that I have to use HTTPS Mode in the gateway for the data to be captured by Fiddler, so I have done this. Fiddler shows the various tunnels being set up, but other than that I don't see anything significant. When I try to apply the gateway connection to the dataset in PBI settings then I don't see any activity in Fiddler, but  then I'm not 100% certain what I should expect to see.

 

In PBI settings everything still looks OK until I try to apply the gateway to the dataset: the gateway is online and connection tests are successful; in the Dataset settings I can see that the gateway is available and online, but when I try to apply it then I get the 'status code 400' error. 

 

I am at a loss to know what else I can check...

 

Alan.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.