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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Khushidesai0109
Super User
Super User

Cannot connect to postgres SQL to power BI desktop occurring the error

Khushidesai0109_0-1733730162911.png The issue is that I have also downloaded NpgSql yet this issue is I am suffering Please help me for same

 

Proud to be a Super User!!
5 REPLIES 5
Anonymous
Not applicable

Hi @Khushidesai0109 

 

Thanks for the reply from Tahreem24 and Ritaf1983 .

 

If your problem still hasn't been resolved, you might consider trying the following. Here's a post I found with a similar error to yours. The solution in it is: Go to File –> Options and Settings –> Data Source Settings, under Global Permissions, select clear old data source connection permissions, and then click Edit Permissions in Power BI Desktop. Then try to connect again and check if it succeeds.

vxuxinyimsft_1-1733813175206.png

 

Solved: We couldn’t authenticate with your credentials. Pl... - Microsoft Fabric Community

 

Hope this helps!

 

Best Regards,
Yulia Xu

Ritaf1983
Super User
Super User


Hi @Khushidesai0109 

It seems like you're encountering a connection issue with PostgreSQL in Power BI. Here are steps to troubleshoot and resolve the problem:

Steps to Resolve:
Verify Credentials:

Ensure that the username and password you entered are correct. Typos can often cause authentication errors.
Try logging into the database directly using a tool like pgAdmin or a command-line interface to confirm that the credentials work.
Check User Permissions:

Confirm that the user has the appropriate permissions to access the database at the specified host and port.
Npgsql Installation:

Ensure that the Npgsql connector is installed and updated to the latest version.
If you suspect a conflict or an incorrect version, uninstall and reinstall Npgsql.
Database Address and Port:

Double-check the database server address (host) and port.
If the database is running locally, try using localhost or 127.0.0.1.
Firewall and Network Settings:

Make sure the PostgreSQL port (default is 5432) is open on your network and firewall.
Test connectivity by pinging the host address to ensure the server is reachable.
Power BI Version:

Ensure that you are using the latest version of Power BI Desktop, as older versions may have compatibility issues with PostgreSQL connections.
PostgreSQL Configuration:

Check the pg_hba.conf file in PostgreSQL and ensure it allows connections from your IP. For example:
css
code:
host all all 0.0.0.0/0 md5
Database Logs:

If the issue persists, check the PostgreSQL logs for more details on why the connection is failing.
Verify SSL Requirements:

Some PostgreSQL instances require SSL connections. If so, enable SSL in the connection settings in Power BI and provide the necessary certificates if required.

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Tahreem24
Super User
Super User

@Ritaf1983 do I need https://odbc.postgresql.org/ driver for this?
also, I have downloaded everything properly and these credentials are working in my Azure data studio as well

Please help me to connect it to power BI

Proud to be a Super User!!

Hi, Did you find a solution to this problem? And if so can you please assist, im having the same problem

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.