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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
spyrefused
Frequent Visitor

Problem with API method "Update Datasources"

Hi!

I've been trying to use an API method from a Powershell script for a while now, the methos is Datasource/Update datasets/{datasetId}/Default.UpdateDatasources.

 

Usually it doesn't work, but sometimes it does.
I basically want to change the Datasource credentials: Server, DB, user & password. The authentication type is "Basic", this doesn't change although I tried to send it in the request as well.

The problem is that the answer from the API is always 200 (as if it had gone ok) but most of the times (not all, sometimes it works fine) in the Powerbi portal I see that the Server and DB data have been changed but not the user & password and also the type of authentication seems to be in "Windows".

 

The connection is both in Azure SQL.

 

Has it happened to anyone? It's quite strange...

 

Thank you.

1 REPLY 1
JirkaZ
Solution Specialist
Solution Specialist

@spyrefused Can you post a sample JSON with the request body?

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.