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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
ChetanK004
Frequent Visitor

How to change the connections details of published dataset in service for live connection

Hi,

 

I have this workflow

  1.  I create a dataset in my dev workspace and point it to dev database
  2.  I deploy this from dev to many target workspaces
  3.  I deploy this using CI/CD and publish it to various workspace, and during the process i rebind all the report in the workspace to target workspace dataset
  4.  I try to download one of the report using live connection
  5.  Update the layout of report and Try to publish it back using PostImportFile REST API
  6.  I get PowerBIModelNotFoundException on publishing

   

Did a deep down and found that this exceptions occurs due to 

  • When we download live connection it will not have dataset related metadata
  • When we rebind the dataset it will only change a service connection inside the dataset and not the live connection
  • When ever we dowload and open PBIX it connects to dev model rather the target workspace modal, hence making any changes to the report and pushing back fails because the live conencted modal(dev modal) doesnot exists in the target workspace
{
  "Version": 2,
  "Connections": [
    {
      "Name": "EntityDataSource",
      "ConnectionString": "*****"
      "ConnectionType": "pbiServiceLive",
      "PbiServiceModelId": ******,
      "PbiModelVirtualServerName": "******",
      "PbiModelDatabaseName": "d*******3"
    }
  ],
  "RemoteArtifacts": [
    {
      "DatasetId": "f*******c",
      "ReportId": "1********6"
    }
  ],
  "OriginalWorkspaceObjectId": "9**********7"
}
 ​

 

  • In the above when we perform rebinding the RemoteArtifacts.DatasetId set gets changed but not PbiModelDatabaseName 

 

If we change the PbiModelDatabaseName to the target workspace dataset Id would it work?

If so how do we change it dynamically (either REST API or Tabular Editor), also what value would we need to provide?

 

If above changes is not possible what else could we try to accomplish the same?

 

8 REPLIES 8
KevinChant
Super User
Super User

Are you using Microsoft Fabric Git integration as part of your CI/CD strategy? If so, it might be a good idea to test working with the Power BI Desktop Project instead:

Power BI Desktop projects (PBIP) - Power BI | Microsoft Learn 

Hi Kevin, No we dont have the requirement to work with Power BI Desktop hence we cannot be using PBIP, we needed it to be part of the service

ChetanK004
Frequent Visitor

@Ahmed-Elfeel , Thanks for the response,

 

When you say rebind after publishing the report  - we are doing the rebind after publishing the reports to target workspace using CI/CD (is this what you meant or something else ?)

 

also  

  • Rebind the report in the service to the target dataset - I couldnt find an option to rebind the report in service

 

  • Then Download the PBIX (now it connects to the correct dataset) - after the CI/CD rebind still it points to dev Dataset (do you think this will be different if we do it in service?)

 

  • Finally Edit it then republish - this will only work if rebound report contains metadata of dataset present in target workspace, which is not in our case

Note: We are not using Power BI desktop in the above process all the code are either in CI/CD or we use C# code to perform actions

 

We also tried an alternative with using blank report

- create a blank report in target workspace(now this points to a correct dataset)

- get the rebound report and paste the layout file from rebound report to blank report

- post the update blank report - This will successed 

 

BUT!!, the problem is we will lose all the themes and images and all other things that was present with rebound reports, do we have any workaround or alternative for this?

Hello @ChetanK004,
At the moment, Power BI does not support updating live connection metadata inside a PBIX like PbiModelDatabaseName through API or tooling. Because of this limitation, scenarios like CI/CD-based republish of live-connected reports are restricted.

If this capability is important for your deployment flow, I would recommend raising this as an Idea on the Microsoft Fabric / Power BI Ideas forum. That way, the product team can review it and other users facing the same issue can vote on it.
Fabric Ideas - Microsoft Fabric Community

Regards,
Community Support Team.

Hi @ChetanK004,
Could you please confirm if you've submitted this as an idea in the Ideas Forum? If so, sharing the link here would be helpful for other community members who may have similar feedback.
Thank you for being part of the Microsoft Fabric Community.

Hi @ChetanK004,

Thank you for sharing your idea in the Ideas forum.

We appreciate your contribution. Please note that Microsoft regularly reviews ideas shared by the community, and your suggestion may be considered for future updates.

Thank you once again, and we encourage you to continue engaging with the Microsoft Fabric Community.

Best regards,
Community Support Team.

Ahmed-Elfeel
Solution Sage
Solution Sage

Hi @ChetanK004,

I hope you are doing well today ❤️☺️

 

So when you Rebind a report in the Power BI Service only the service-side binding is updated. The internal connection metadata stored inside the PBIX file Itself is not changed. Also when you download a live-connected PBIX it will still point to the original Dev dataset which causes PowerBIModelNotFoundException when you modify and republish it to a different workspace.

 

Note: There is no supported API or tool (REST, Tabular Editor, XMLA) that can modify live connection metadata inside a PBIX file (Live semantic model connections cant be parameterized or dynamically updated)

 

The only Approach I see is to Rebind after publishing the report:

POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/reports/{reportId}/Rebind
{
  "datasetId": "target-dataset-id"
}
  • Also it works with CI/CD

if you want to Edit the PBIX...you can:

  • Rebind the report in the service to the target dataset
  • Then Download the PBIX (now it connects to the correct dataset)

  • Finally Edit it then republish

If you need more details about Rebinding the report:

if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.

Top Kudoed Authors