Showing results for 
Search instead for 
Did you mean: 
Not applicable

Encrypted PostgreSQL connection to Power Automate

I have been trying to connect a local PostgreSQL server to a Power Automate Flow through the On-premise Data Gateway, but I have been unable to. After a few days of troubleshooting, it appears that the issue is that encryption is not enforced upon the connection. My PostgreSQL server requires encryption and it does not appear the Power Automate PostgreSQL connector gives the option. 

When attempting to make a connection I get the error Credentials are missing or not valid. inner exception: The credentials provided for the PostgreSQL source are invalid. (Source at;db.), but when the logs on the On-premise Data Gateway are reviewed the following logs are found:

  • [DataMovement.PipeLine.GatewayDataAccess] DataSourceReference:<pi>{"kind":"PostgreSQL","path":";db"}</pi>, CredentialDetails.EncryptedConnection:NotEncrypted, isEncryptedConnection:False
  • [{"kind":"PostgreSQL","path":";db","AuthenticationKind":"UsernamePassword","Username":"un","Password":"HIDDEN","PrivacySetting":"None"}]';fastcombine=True;allownativequeries=True;cachepath=$MemoryCache$;maxcachesize=16777216:[Basic] Encrypted Credential information omitted</pi>]
  • Message: 28000: no pg_hba.conf entry for host "IP.IP.IP.IP", user "un", database "db", SSL off; StackTrace: at Npgsql.NpgsqlConnector.

Oddly the PowerBI online PostgreSQL connector connects just fine (with the encryption option turned on), but unlike Power Automate/PowerApps connectors, PowerBI connectors can not be shared with the former. I can see the PowerBI online PostgreSQL connector make the TLS connection in Wireshark, but I the Power Automate/PowerApps connector never even attempts a TLS connection. 

It is my theory that the Npgsql connection string the Power Automate/PowerApps connector is attempting to use is missing the SSL Mode setting, hence Encrypted Credential information omittedI have attempted to review/troubleshoot all the different configuration settings/files for On-premise Data Gateway, .NET, Npgsql, and the PostgreSQL connector, but I have not made any headway in resolving this issue. Any assistance is greatly appreciated. Thanks in advance!! 

Community Support
Community Support



Looking at this issue that you are having I would highly recommend creating a ticket with Microsoft Support. If there is some kind of bug or issue with this connector it would be best to take a look at it with our back end resources and try and get some kind of workaround put in place. If any other communities members have come across this before it would be very helpful to chime in with anything you all have found. Otherwise I will include a link on opening a Microsoft Support request below;


If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so:








Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Not applicable

After working the ticket with Microsoft I got the following response:

"The Product group confirmed that the Power Automate PostgreSQL connector does not currently support SSL encryption and the only available workaround is to disable SSL encryption on your server. I totally understand that is required by your organization and cannot be turned disabled on your server, unfortunately that is the only available workaround for now."


I will be investigating other options for automation with an SSL encrypted PostgreSQL connection.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,659)