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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
NandanHegde
Super User
Super User

Unable to update data source for Report having multiple Azure SQL data sources via REST API

Hello Team,

I have a report which has 2 data sources:

1) Azure SQL database 1

2) Azure SQL database 2

Both are in import mode.

 

This is the code that I am using to update the data source is :

 

$response=Invoke-PowerBIRestMethod -Url "groups/$($workspace.id)/datasets/$($datasetid)/Default.UpdateDatasources" -Method Post -Body $Body | ConvertFrom-Json

 

DataSources.PNG

 

I am able to update multiple data sources if the datasource  types are different.

 

But since in this case the datasource types for both the datasources is same(SQL).
And since the REST API has parameter as the dataset ID which being same for both data sources, the update query is failing.

 

So is there any way by which we can pass the datasourceid as the parameter to update the datasource or the only way for us the achive the CI CD for suce use cases is to parameteris the data sources.




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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