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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
JoshuaOD
Regular Visitor

DirectQuery with PostgreSQL Connector Failing Due to Certificate Validation Error

I'm working with a PostgreSQL database to import data into Power BI. Currently, I'm using an ODBC connector which defaults to importing entire datasets from the database. However, for my current project, I need to use the DirectQuery option.

When attempting to use the PostgreSQL connector provided by Power BI, I consistently encounter the following error:

 

Error Details:
"An error happened while reading data from the provider: 'The remote certificate is invalid according to the validation procedure.'"

I have attached screenshots showing the error message and the ODBC configuration I am using.

 

Does anyone have any suggestions on how to resolve this issue? My goal is to use DirectQuery with PostgreSQL instead of relying on ODBC connectors which default to Import Mode.

 

Default ODBCDefault ODBCFailing Postgres ConnectorFailing Postgres Connector

 

Thank you in advance for your help!

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @JoshuaOD - Make sure you have the latest version of the Npgsql driver installed, as it supports SSL connections. You can download it from Npgsql official website.

 

or 

Releases · npgsql/npgsql (github.com) direct link for connector

 

Install the SSL certificate used by your PostgreSQL server on your client machine where Power BI is running. This can often be done by importing the certificate into the system's trusted certificate store.

 

Solved: Connector Postgre SQL DATABASE - Microsoft Fabric Community

 

Ensure postgresql.config file on your PostgreSQL server to enable SSL.

ssl_cert_file = 'server.crt'
ssl_key_file = 'server.key'

 

Hope it helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @JoshuaOD - Make sure you have the latest version of the Npgsql driver installed, as it supports SSL connections. You can download it from Npgsql official website.

 

or 

Releases · npgsql/npgsql (github.com) direct link for connector

 

Install the SSL certificate used by your PostgreSQL server on your client machine where Power BI is running. This can often be done by importing the certificate into the system's trusted certificate store.

 

Solved: Connector Postgre SQL DATABASE - Microsoft Fabric Community

 

Ensure postgresql.config file on your PostgreSQL server to enable SSL.

ssl_cert_file = 'server.crt'
ssl_key_file = 'server.key'

 

Hope it helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors