Bug in Azure Logic App's PostgreSQL connector

Oliver 0 Reputation points
2025-08-25T09:12:48.8+00:00

Hello!

Azure Logic App. Added action "PostgreSQL -> Insert Row". This requires creating a connection to an actual PostgreSQL server, which in our case is an Azure PostgreSQL for Flexible Server instance.

I have filled out the following connection details:

  • Connection Name
  • Server (the FQDN of our Azure PostgreSQL for Flexible Server)
  • Database Name
  • Authentication Type (you can only choose "Basic" there)
  • Username
  • Password
  • Encrypt Connection (tickbox, is enabled)

And once I hit "Create", the connection fails with the following message:

Failed to create connection: { "status": 400, "message": "An error happened while reading data from the provider: 'The remote certificate is invalid according to the validation procedure.'\r\n inner exception: An error happened while reading data from the provider: 'The remote certificate is invalid according to the validation procedure.'\r\nclientRequestId: 945f8b89-398a-4737-91b9-6d9753cb7548", "error": { "message": "An error happened while reading data from the provider: 'The remote certificate is invalid according to the validation procedure.'\r\n inner exception: An error happened while reading data from the provider: 'The remote certificate is invalid according to the validation procedure.'" }, "source": "postgresql-ne.azconn-ne-003.p.azurewebsites.net" }

This seems to be a bug in the Azure Logic App's PostgreSQL connector, as PostgreSQL's server certificate is managed by Azure and should follow whatever rules Azure sets.

Can someone from the Azure team please check on this.

Best wishes
Oliver

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Rakesh Mishra 2,025 Reputation points Microsoft External Staff Moderator
    2025-08-30T10:37:54.8+00:00

    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:

    1. 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
    2. 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.
    3. 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.
    4. Configure an Environment Setting After uploading, add an app setting named WEBSITE_LOAD_ROOT_CERTIFICATES to your Logic App’s configuration. This setting holds the thumbprint(s) of your uploaded certificates, telling the Logic App to load and trust them.
    5. 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


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.