Npgsql 3.0.3 error with Power BI Desktop Npgsql 3.0.3 error with Power BI Desktop postgresql postgresql

Npgsql 3.0.3 error with Power BI Desktop


I was able to fix the issue by installing the Amazon RDS public certificate on my machine. Once I did this, I was able to connect.

Steps I followed:

  1. Download the AWS RDS public certificate 1
  2. Create a .crt file from the .pem file downloaded. Sample instructionshere 2
  3. Install the certificate (.crt file) on the machine. 3
  4. Connect!


The docs from npgsql give the solution as changing the default trust server certificate of 'false' to 'true' in the connection string.Unfortunately, neither Excel (AFAIK) nor Power BI will allow you to edit the connection string. So if you are unable to get the SSL certificate from the DB admin (as suggested in another answer), or the SSL cert has a different server name to the name you connect to (in my case an IP address), there is not much that can be done.

I can see two ways of fixing this. Either Shay & co from npgsql (who are doing an excellent job btw) provide some way for users to change the default settings for the connection string parameters. Or Microsoft allows users to send keywords in the connection dialog of Power BI (and Excel).


Npgsql 2.x didn’t perform validation on the server’s certificate by default, so self-signed certificate were accepted. The new default is to perform validation, which is probably why your connection is failing. Specify the Trust Server Certificate connection string parameter to get back previous behavior.

You can read more on the Npgsql security doc page, note also that this change is mentioned in our migration notes.