Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi Power BI Community,
I’m facing an issue with Power BI Desktop and Service when connecting to a PostgreSQL database hosted on a GCP VM with PgBouncer. In Power BI Desktop (on Windows), manual refresh works fine when I uncheck "Encrypt connection" (non-SSL), as SSL is disabled on the server. However, the automated refresh in Power BI Service fails, likely because it expects SSL. When I tried enabling SSL on the server and checked "Encrypt connection" in Desktop, I got an "800 something" error, possibly due to certificate issues.
Error : Last Refresh Failed
Error : Data source Credentials
Error : After Entered The Right Credentials
Solved! Go to Solution.
Solution Summary: Connecting Power BI to a DB on Ubuntu VM in GCP
We successfully resolved the connectivity issue to a database hosted on a Ubuntu OS inside a VM on GCP (Google Cloud Platform). Here's a step-by-step breakdown of what worked, both in Power BI Desktop and Power BI Service.
Open Power BI Desktop
Go to the Home tab > Click Transform Data
In the Power Query Editor, go to:
File > Options and settings > Data source settings
Select your data source and click Edit Permissions
In the Edit Permissions window:
Uncheck the "Encrypt connections" box (if applicable)
Set the Privacy Level to Organizational
Click OK, close the editor, and publish the report to the Power BI Service
Go to the relevant Workspace in Power BI Service
Find the Semantic Model (Dataset) you just published
Click the three dots (···) > Settings
Under Data Source Credentials:
Select Authentication Method as OAuth
Enter your DB credentials and Sign in
Scroll to Gateway and Cloud Connection
Enable "Use an On-premises or VNet data gateway"
Under the Gateway section:
Click the dropdown under Action > Choose "Add to gateway"
Create a new data source connection that matches the configuration used in Power BI Desktop
Now, you're able to successfully refresh the data in Power BI Service.
This setup solved our issue connecting to a database hosted in an Ubuntu VM on GCP.
Hi @Arunagiri,
Thanks for reaching out to the Microsoft fabric community forum.
It looks like your issue is when Power BI Service enforces SSL for PostgreSQL connections, while your database does not support encrypted connections. There can be multiple reasons for that like:
* Power BI Desktop works when "Encrypt connection" is unchecked, as your PostgreSQL server does not have SSL enabled.
* Power BI Service fails because it requires an SSL connection by default.
* When you enabled SSL, you encountered an error, likely due to certificate issues.
Here you can follow these solutions depending on whether you want to enable SSL or allow unencrypted connections:
* Enable SSL in PostgreSQL by updating "postgresql.conf" then update the "pg_hba.conf" to allow SSL connections. After this restart PostgreSQL and ensure the certificates are valid. Now in Power BI Desktop, check "Encrypt connection" and re-publish your report and in Power BI Service, re-enter credentials and test refresh.
* In this option you need to modify the connection string in Power BI Service to explicitly disable SSL. If Power BI Service still enforces SSL, you may need to use an on-premises data gateway to manage the connection.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
HI @v-mdharahman ,
Thanks for your valuable insight, BUT..
we did all the procedure in the postgres as well as pg about the ssl cretificate, After we did this configuration we are getting the error like this.
THIS IS WITH THE ENCRYPTION ENABLED
Hi @Arunagiri,
Thanks for following up with the conversation. Based on your new error message, "The remote certificate is invalid according to the validation procedure," it looks like Power BI is rejecting the SSL certificate from your PostgreSQL server. There can be multiple reasons for this to occur like your Certificate must be trusted and if you are using self-signed certificates, Power BI may not trust them. Also if possible, obtain an SSL certificate from a public Certificate Authority (CA) instead of a self-signed one. This ensures Power BI recognizes the certificate without extra configuration.
Please try these solutions and let us know if the issue persists. If possible, provide details on how the SSL certificate was generated or the exact SSL mode used in your Power BI connection
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi @Arunagiri,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.
Hi @Arunagiri,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution so that other community members can find it easily.
Thank you.
Hi @Arunagiri,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @v-mdharahman ,
I,m really sorry for the delay, Honestly I didn't solve and i didn't notice the REPLY.
We tried all the ways but we coluldn't solve the issue.
The thing is it was asking for purchase the Domain for the ssl configure.
Is there any way we can do without doing the above step.?
Hi @Arunagiri,
Thank you for the update. You are right in most cases, to generate a trusted SSL certificate, you need a registered domain. This is because trusted authorities require domain ownership validation. If purchasing a domain is not an option, here are alternative option you can consider:
* You can use SSL with Self-Signed Certificate with On-Premises Data Gateway. Power BI Service does not trust self-signed certificates by default, but you can bypass this restriction by using an On-Premises Data Gateway. Install and configure an on-premise data gateway on a Windows machine. Then use Power BI Desktop with encryption disabled or with a self-signed certificate. Now in Power BI Service, set up the data source in the gateway, and assign it to your dataset. Now, Power BI will use the gateway for refreshes, and SSL validation errors won’t occur since the gateway handles the connection.
This method avoids needing a public domain or a trusted certificate.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi @v-mdharahman ,
Thank you for your detailed response — it's very helpful.
To clarify our setup:
We are hosting a PostgreSQL database on a Google Cloud Platform (GCP) VM running Ubuntu. Since it's a Linux-based VM, we cannot install the On-Premises Data Gateway, which is only available for Windows.
You're right that Power BI Service requires a trusted SSL certificate or a gateway to connect without errors. However, since we're running Ubuntu and can't use the gateway, we are looking for alternative solutions.
Could you please advise on the best approach in this case?
is there another recommended way to securely connect Power BI Service to a PostgreSQL instance hosted on an Ubuntu VM in the cloud?
Appreciate your guidance.
Solution Summary: Connecting Power BI to a DB on Ubuntu VM in GCP
We successfully resolved the connectivity issue to a database hosted on a Ubuntu OS inside a VM on GCP (Google Cloud Platform). Here's a step-by-step breakdown of what worked, both in Power BI Desktop and Power BI Service.
Open Power BI Desktop
Go to the Home tab > Click Transform Data
In the Power Query Editor, go to:
File > Options and settings > Data source settings
Select your data source and click Edit Permissions
In the Edit Permissions window:
Uncheck the "Encrypt connections" box (if applicable)
Set the Privacy Level to Organizational
Click OK, close the editor, and publish the report to the Power BI Service
Go to the relevant Workspace in Power BI Service
Find the Semantic Model (Dataset) you just published
Click the three dots (···) > Settings
Under Data Source Credentials:
Select Authentication Method as OAuth
Enter your DB credentials and Sign in
Scroll to Gateway and Cloud Connection
Enable "Use an On-premises or VNet data gateway"
Under the Gateway section:
Click the dropdown under Action > Choose "Add to gateway"
Create a new data source connection that matches the configuration used in Power BI Desktop
Now, you're able to successfully refresh the data in Power BI Service.
This setup solved our issue connecting to a database hosted in an Ubuntu VM on GCP.