Forum Discussion
Unable to connect MS Fabric and Azure database for Postgres using copy activity
- 9 months ago
Hi All,
Thanks for your support , the issue has now been resolved. With the same tech stack, the on-premises data gateway works as expected.
Below is the additional action required:
Microsoft Fabric currently does not support mutual TLS (mTLS) when connecting to PostgreSQL. It only supports standard TLS with username/password authentication and cannot present the client certificate and key required by our mTLS-enabled PgBouncer endpoint. Due to this limitation, Fabric fails during the handshake phase, resulting in the error observed.
To enable Fabric connectivity while preserving our existing security posture, we will proceed with Alternative 1 from our internal analysis:
✅Planned Approach
We will relax mTLS enforcement only for Fabric by setting up a dedicated PgBouncer listener/pool that:does not require client certificates,
is accessible from Fabric’s data gateway public IP range, and IP address of on prem data gateway.
retains full mTLS enforcement for all other traffic.This approach allows us to maintain strong security controls while ensuring Fabric can connect successfully.
Thanks for you feedback Kash10,
- Only specify:
- Server: servername.postgres.database.azure.com
- Database
- Authentication: username@servername and password
- Enable SSL, as this is mandatory for Azure PostgreSQL.
If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.
Hi Zanqueta,
I am trying to connect through data factory, haven't tried through Power BI Desktop as my requirement is more from a data engineering perspective. I have used the connection strings directly as you have mentioned, still it's not connecting.
- v-sgandrathi10 months ago
Community Support
Hi Kash10,
It appears that the main issue is Fabric Data Factory’s inability to connect to Azure PostgreSQL because the connection is routed through the public network, and Fabric doesn’t provide fixed outbound IPs. As a result, whitelisting the gateway machine’s IP isn’t a reliable solution. The recommended approach is to enable Managed VNet in your Fabric workspace and set up a Managed Private Endpoint to your Azure PostgreSQL instance (which should have Private Link enabled). This configuration allows for private network communication, avoiding IP-based firewall issues. If you choose to use the on-premises data gateway, make sure it’s updated, properly mapped to the PostgreSQL connector, and that SSL and the correct credentials (username@servername) are used.
Thank you.