Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Failed to update data source credentials: The credentials provided for PostgreSQL source are invalid

Hi everyone,

 

We are using PowerBI online application, with Desktop version to develop reports. We are storing data in Postgres hosted by Azure (Postgres username is using format ABC@DEF). We are using a personal gateway to refresh the data along with NPGSQL version 2.2.7 in order to make the gateway connectable with the Postgres and data to be able to flow.

 

Everything worked until a day ago when we noticed that the refresh of the data was not possible anymore due to the update of Gateway is available. We updated the gateway, and also .NET to most up to date versions. We are keeping NPGSQL same 2.2.7 version.

 

When I refresh the data in Desktop, everything works. I can also connect to the database with correct credentials using any Postgres client. However, when logging into the Cloud application, I can see in the Settings/Datasets that gateway is connected, but credentials are apparently wrong as we get the error below:

 

 Failed to update data source credentials: The credentials provided for the PostgreSQL source are invalid. (Source at databaseURL;postgres.)

 

Activity ID: 1bb263bf-4fce-4234-87bb-c908c407d52e

Request ID: 86d2a9fb-4f95-8b3b-1c67-06bb93658e36

Status code: 400

Time: Wed Nov 06 2019 20:22:14 GMT+0000 (Greenwich Mean Time)

Service version: 13.0.11271.222

Client version: 1910.4.033

Cluster URI: https://wabi-europe-north-b-redirect.analysis.windows.net/

 

I have a log file in case that would help I can paste it here, but it is quite long.

 

Questions: 

 

  1. Is using old NPGSQL 2.2.7 instead of 4.1.1 a problem? But using any newer version makes the gateway unable to connect to the Postgres. 
  2. I saw a post that claimed that any username containing at @ will be an issue when communicating between services, is that true?
  3. What should I look into to fix the issue?

Thank you very much for your time!

Connie

5 REPLIES 5
Anonymous
Not applicable

Hi All,

I am also facing the same issue. I am using azure postgres SQL as the database. I am able to connect with azure postgres sql from PowerBI desktop and everything work fine for me. But when I published my report to Power BI service in my workspace. There in the dataset settings it is showing invalid credentials. 
When I tried to put the credentials, then again it is showing same error. 

Can anyone please help here?

I am just facing the same issue.
I installed PBI On-Premises Gateway and Azure Data Studio on a server in my organization.
From that server I can reach the Azure Postgres DB using the same credential I am trying to insert on PBI Service. I think the solution could be to pass to VNet Gateway https://powerbi.microsoft.com/en-my/blog/postgresql-connector-for-the-virtual-network-data-gateway/Postgres.PNG

nima_mlk
Frequent Visitor

I am facing the exact same issue, and it's absolutely frustrating. All of a sudden, without me updating anything, my dataset stopped refreshing. I tried upgrading AND downgrading the PBI Desktop and the gateway, restarting the gateway, clearing cache and republishing the dataset, with no luck.

venal
Memorable Member
Memorable Member

@Anonymous 

Hoping that it is an intermittent issue.

 

Can you please open the Report IN Power BI Desktop and apply the beow steps.

 

1. File >> Options & Settings >> Options >> Clear Cache (Data Cache , Q & A Cache) >> Ok

2.  Home >> Edit Queries >> Edit Queries >> Refresh Preview >> Refresh All >> Close and Apply

3. Home >> Refresh 

4. File >> Save/Save As >> Publish.

5. Try to check with "Refresh Now/On-Demand Refresh".

 

Note:- Always try to maintain the latest version of the Gateway. (Personal/On-premises).

 

If this post helps, then please consider Accept it as the solution to help the other members find it more

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Anonymous
Not applicable

Hey @venal 

 

thank you for your quick reply and providing detailed steps. I followed them all but unfortunately the problem still persists.

 

Here it is said that a username containing @ symbol may be an issue, are you perhaps aware of that? We are using Postgres on Azure and we have such a name containing @ symbol.

 

Is there a way to see what username gateway is sending to the database? I tried to include additional logs, but no luck. 

 

SOLUTION: 

What I did then was to download the Gateway from June 2019 and installing this version worked. 🙂 It seems that something has changed between June 2019 and October 2019, I think for someone that has access to the code it should not be too difficult to find the root of the problem.

 

I will wait for the next release and try if it works.

 

Thank you again

Connie

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors