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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Mann
Resolver III
Resolver III

Changing Data Source in Power BI dynamically using REST API through PowerShell

Hi All,

 

I have created Power BI report in top of Azure analysis services. Dashboards are also created further on this report. For deployment of these components from QA workspace to Prod workspace, I am using REST API and PowerShell to copy all components from QA Workface to Prod Workface.

In this process I need to do one step manually that is to change the data source to prod AAS model. Can we do this with PowerShell using Power BI REST API.

2 REPLIES 2
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Mann

 

I would suggest you visit PowerShell forum for better assistance.Here is the blog about Working with PowerShell in Power BI

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

Thanks for the reply! I posted this on the other forum you recommended. Seems like they have moved it to some other forum.

 

If we can't alter the data source connection for Power BI live report can we change the connection locally. I mean if I zip the file and change the connection details in "Connection" file within it. I tried this but it says report is corrupted.

 

If we can do this by some way then I am thinking of automating these steps in Power Shell. Let me know if this can be done?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.