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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
gsrivastava
New Member

How to move entire workspace with Datasets and reports to a new Datasource without re-deploying?

Hello,

 

We recently changed the Database ports for our Databases. Now that new Database Port is required for connecting Datasets in Power BI.
I know that we can redeploy the datasets with the new DB port, and then publish the datasets which will start showing the new connection paramaters.
But is there a way by which the entire Workspace in Power BI can be moved to a new Gateway Setting without having to redeploy the Datasets?

 

1 ACCEPTED SOLUTION
Martin_D
Super User
Super User

Hi @gsrivastava ,

 

Yes, you can. Theres is a REST API Method to change datasource settings:

 

https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources

 

This API must be called per dataset. I'd recommend to loop over the datasets of your workspace in a PowerShell script to change the port of all effected data sources. There are ready to use PowerShell CmdLets that use the Power BI API:

 

Since there is no specific CmdLet to update datasource settings you can use the generic Invoke-PowerBIRestMethod CmdLet.

 

BR

Martin

github.pnglinkedin.png

View solution in original post

1 REPLY 1
Martin_D
Super User
Super User

Hi @gsrivastava ,

 

Yes, you can. Theres is a REST API Method to change datasource settings:

 

https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources

 

This API must be called per dataset. I'd recommend to loop over the datasets of your workspace in a PowerShell script to change the port of all effected data sources. There are ready to use PowerShell CmdLets that use the Power BI API:

 

Since there is no specific CmdLet to update datasource settings you can use the generic Invoke-PowerBIRestMethod CmdLet.

 

BR

Martin

github.pnglinkedin.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.