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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Update Datasource in Paginated report using Power BI

Hi DEVs,

 

I need to update datasource of paginated reports using PBI Dataset from DEV workspace's dataset to PROD workspace's dataset

 

There are 100+ paginated reports and it's hard to update the datasource to PROD dataset everytime deploying to Production workspace

 

Is there's any way I can update programatically using Python or PowerShell?

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Anonymous ,

To change the data source of a paginated report programmatically, you can use the Power BI REST API. Here are the high-level steps you can follow:

  1. Get the report ID of the paginated report you want to modify.
  2. Get the data source ID of the dataset you want to modify.
  3. Modify the connection string of the data source using the Power BI REST API.
  4. Update the data source of the dataset using the Power BI REST API.
  5. Update the report using the Power BI REST API.

Here are some references that can help you with the implementation:

Get the report info:

Reports - Get Reports - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Get the data source:

Datasets - Get Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Update data source:

Datasets - Update Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Change data source connection strings with PowerShell - Power BI | Microsoft Learn

Get the report info:

Reports - Update Report Content - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

Please note that you need to have the necessary permissions to perform these actions. Also, make sure that the data source in the prod environment has the same schema and data as the one in the dev environment.

Best Regards

View solution in original post

Anonymous
Not applicable

Hi @Anonymous ,

It will only update the data source from DEV environment to PROD environment. You can use Power BI deployment pipelines to clone content from one stage in the deployment pipeline to another, typically from development to test, and from test to production. During deployment, Power BI copies the content from the current stage into the target one. The connections between the copied items are kept during the copy process. Power BI also applies the configured deployment rules to the updated content in the target stage.

You can also deploy content programmatically using the deployment pipelines REST APIs. You can learn more about this process in Automate your deployment pipeline using APIs and DevOps.

The Power BI deployment pipelines process - Power BI | Microsoft Learn

Best practices for deployment pipelines, the Power BI Application lifecycle management (ALM) tool - Power BI | Microsoft Learn

Best Regards

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

To change the data source of a paginated report programmatically, you can use the Power BI REST API. Here are the high-level steps you can follow:

  1. Get the report ID of the paginated report you want to modify.
  2. Get the data source ID of the dataset you want to modify.
  3. Modify the connection string of the data source using the Power BI REST API.
  4. Update the data source of the dataset using the Power BI REST API.
  5. Update the report using the Power BI REST API.

Here are some references that can help you with the implementation:

Get the report info:

Reports - Get Reports - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Get the data source:

Datasets - Get Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Update data source:

Datasets - Update Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Change data source connection strings with PowerShell - Power BI | Microsoft Learn

Get the report info:

Reports - Update Report Content - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

Please note that you need to have the necessary permissions to perform these actions. Also, make sure that the data source in the prod environment has the same schema and data as the one in the dev environment.

Best Regards

Anonymous
Not applicable

Will it also publish the report to PROD workspace? or just change the datasource in DEV workspace

@Anonymous  is this issue resolved ? Please let me know as I also have to do this.

Anonymous
Not applicable

Hi @Anonymous ,

It will only update the data source from DEV environment to PROD environment. You can use Power BI deployment pipelines to clone content from one stage in the deployment pipeline to another, typically from development to test, and from test to production. During deployment, Power BI copies the content from the current stage into the target one. The connections between the copied items are kept during the copy process. Power BI also applies the configured deployment rules to the updated content in the target stage.

You can also deploy content programmatically using the deployment pipelines REST APIs. You can learn more about this process in Automate your deployment pipeline using APIs and DevOps.

The Power BI deployment pipelines process - Power BI | Microsoft Learn

Best practices for deployment pipelines, the Power BI Application lifecycle management (ALM) tool - Power BI | Microsoft Learn

Best Regards

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.