Information and Communications Technology

Connecting PowerBI to PostgreSQL

Connecting PowerBI to PostgreSQL generate this certificate error: “The remote certificate is invalid according to the validation procedure”

We need to estabilish a connection adding the certificate to the trusted certificates.

In this example the PostgreSQL server has ip and hostname pgsql-test-server.

Install latest NPGSQL with msi package from (at this time is v4.1.14):

Install openssl command line and extract the certificate with this command:

openssl s_client -starttls postgres -connect > %USERPROFILE%\Desktop\pg-server-cert.cer

The file is saved on the user desktop.

Import the certificate in the Trusted Root Certificate.

Then, IMPORTANT, for the connection do not use the ip, you must use the hostname present in the .cer file as CN.