Hello Oliver, Thank you for the details.
This happens because Azure recently changed the security certificates used by PostgreSQL servers. The Logic App’s PostgreSQL connector doesn’t yet recognize or trust the new certificates used by Azure, so it refuses to connect. It’s not a problem with your server or credentials - it’s about the Logic App not having the right certificate to trust the server’s identity.
The best fix is to make sure your Logic App trusts the updated certificates Azure uses. Here’s how to do that step-by-step:
- Get the Right Certificates Azure PostgreSQL servers use three main root certificates that your Logic App needs to trust. You need to download them:
- DigiCert Global Root CA
- DigiCert Global Root G2
- Microsoft RSA Root Certificate Authority 2017
- Combine the Certificates After downloading, you combine all three certificates into one bundle. This bundle becomes the list of certificates your Logic App trusts when connecting securely.
- Upload Certificates to Your Logic App in the Azure Portal, go to your Logic App’s settings and upload this combined certificate bundle. This tells your Logic App to use these certificates to verify the PostgreSQL server.
- Configure an Environment Setting After uploading, add an app setting named
WEBSITE_LOAD_ROOT_CERTIFICATESto your Logic App’s configuration. This setting holds the thumbprint(s) of your uploaded certificates, telling the Logic App to load and trust them. - Restart and Retry Finally, restart your Logic App to apply the changes and try creating the PostgreSQL connection again. It should now connect without certificate errors.
Quick Temporary Fix (Not for Production)
If you want a quick workaround for testing:
- You can turn off SSL enforcement on your PostgreSQL server (not recommended for production since it removes encryption).
- In the Logic App PostgreSQL connection, uncheck the “Encrypt Connection” option.
- This makes the connection insecure but can help verify if the problem is certificate related.
If the above is not feasible, you could:
- Use the JDBC connector instead, which lets you specify the trusted certificates directly.
- Build a custom connector or use an Azure Function as a middleman to handle the connection securely.
Microsoft Reference Documentation