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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
GwenScope
Frequent Visitor

Connecting to PostgresSQL via SSL hosted on Google Cloud Platform (GCP)

Hello team,

 

I am trying to connect to PostgresSQL in SSL via Google Cloud Platform (GCP). However, when I am trying to connect, I have the following certificate error happening : "An error happened while reading data from the provider: 'The remote certificate is invalid according to the validation procedure.'"

 

I followed the common steps mentionned in other posts to install certificates, but I keep getting the same error.

 

Here are the steps I followed :

  1. Installed Npgsql version 4.0.10 using the Package Manager in Visual Studio Code
  2. Downloaded the client-cert.pem, server-ca.pem and client-key.pem files from my GCP
  3. I converted those certificates from .pem to .p7b (I also tried to import them as .pem, but also as .cer, .pfx and .der) using openssl
  4. I imported the certificates to my local computer's Trusted Rood Certificate Store
  5. Switched off my computer, erased any previous credentials on Power BI
  6. Try connection from Power BI desktop using the PostgresSQL connector

 

When disabling the encrypt connexion box everything works fine, but I want to have a secure pipeline.

 

As I want to connect to my DB using Direct Query, I have to use the postgreSQL connector (over the ODBC).

Therefore, does anyone have a solution to enable an SSL connexion through the postgreSQL connector when using GCP ?
If not, does anyone have a solution to connect in Direct Query to a DB hosted on GCP ?


PS : when I open the certificate generated by GCP in my computer's trusted root, I get the following information on the certificate : "windows does not have sufficient information to verify this certificate". Could this be the reason why Power BI can't securley connect ? If so, how can I work around that ?

2 REPLIES 2
GwenScope
Frequent Visitor

Hi @Anonymous,

 

I thank you for your reply. However the links did not help me solve the issue (there is no solution in the first link).

 

If I may be more precise, my GCP is setup to only allow SSL-only connections, and I am trying to connect to the public IP of my DB. I also allowlisted my network.

 

I managed to connect to my DB using DBeaver, but I had to set the exact path to the certificates. However, there is no possibility to do the same in Power BI. I think the issue lies in the installation of the certificates on the trusted store.

 

Best regards

Anonymous
Not applicable

Hi @GwenScope 

You can refer to the following link.

postgresql - Connect Power Bi to Postgres on Google Cloud Platform - Stack Overflow

easyinsights.ai

 

Best Regards!

Yolo Zhu

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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