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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
connietse
New Member

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

@connietse 

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?

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors