Forum Discussion
Web Source via Gateway - Could not establish trust relationship for the SSL/TLS secure channel
I have just run into the same error.
I wanted to fetch data from a web server via REST API that is located on an on-premises network. I managed to import the data into Power BI Desktop using a custom connector because I added the server's CA certificated to the user's cert store on my Windows machine.
Next, I created a report in Power BI Desktop and published it to Power BI online. Because I wanted my data set to refreshed in Power BI online, I installed the on-premises enterprise data gateway on the Windows machine. Configured everything as per the official docs (add custom connector to the gateway, add data source to the the gateway in Power BI online), but when trying to add the data source to the gateway in Power BI online, I got the error mentioned above:
"Could not establish trust relationship for the SSL/TLS secure channel".
As FFFritz suggested, adding the CA cert to PBIEgwService user's Trusted Root Certification Authorities store might help, because the gateway is running in the name of PBIEgwService by default.
You could import the cert to the service account following this article, but selecting "Service account" instead of "Computer account" and select "On-premises data gateway service". I tried that in the first place but it did not worked. I removed the CA cert from the PBIEgwService's cert store to start with a clean state and imported it to the local computer's cert store as Trusted Root Certification Authority. This solved the problem for me.
David