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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.