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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
structure40
Regular Visitor

Migration from Collections to Embedded Confusion

I have followed the guide for migration. What I am struggling with is updating the username and password for my reports that have been migrated. I have read through the not so helpful code snippets but have no idea where to get the information required from the snippets. For example on setting the credentials: what is the new gateway id and dataset id?

 

The guide states the values could be updated manually from PowerBI.com but I only get 400 errors when trying no matter what migrated report I try. Anybody able to successfully migrate and update DirectQuery credentials?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @structure40,

 

thanks for taking the time to view the gist. These were some typo mistakes while I was moving the code from production to the gist and doing the appropriate transformations. I fixed the gist so you can try again. 

Fixes performed:

- (PostUpdateDatasourcesConnectionAsync)The reportDatasetKey changed to reportDatasetId

- (SetReportParameters)destinationWorkspaceId changed to tenantWorkspaceId

- (PostUpdateDatasourcesConnectionAsync) SendAsync has been changed to accept HttpContent

 

Hope it helps.

 

Thanos

PS: Please accept this reply as solution if this solved your problem. We should help other people to know that there is an answer for this issue.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @structure40,

 

do you wanna read my blog post about templating in a multi-tenant environment. In there I also explain (and also provide a gist) some things about credentials (updata datasources and credentials).

Hope it helps.

 

Thanos

Thanks Thanos. I am taking a look at your sample code and there appears to be a couple errors that I am struggling with understanding what is missing. 

 

The first is CloneReportAsync where we are calling PostUpdateDatasourcesConnectionAsync. It is looking for reportDatasetKey which is an unknown variable. Any idea what they should be set as?

 

There is also an issue in PostUpdateDatasourcesConnectionAsync on the call to SendAsync using the object created from StringContent but the method is expecting a Stream.

 

The last one is in SetReportParameters. It is using destinationWorkspaceId which is an undefined variable.

 

Thanks for the help. It looks like this should work if I can get past this issues.

Anonymous
Not applicable

Hi @structure40,

 

thanks for taking the time to view the gist. These were some typo mistakes while I was moving the code from production to the gist and doing the appropriate transformations. I fixed the gist so you can try again. 

Fixes performed:

- (PostUpdateDatasourcesConnectionAsync)The reportDatasetKey changed to reportDatasetId

- (SetReportParameters)destinationWorkspaceId changed to tenantWorkspaceId

- (PostUpdateDatasourcesConnectionAsync) SendAsync has been changed to accept HttpContent

 

Hope it helps.

 

Thanos

PS: Please accept this reply as solution if this solved your problem. We should help other people to know that there is an answer for this issue.

Thanks for the update. I ended up in the same place as you did with your proposed changes. I also had to enable a firewall rule on the database I was trying to access to get this to work. Thanks again for the help.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.