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 server.com:5432;db.), but when the logs on the On-premise Data Gateway are reviewed the following logs are found:
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 omitted. I 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!!
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: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support
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.
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.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.