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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

migrate power bi collection to power bi embeded


I tried to follow the article to migrate power bi collection to power bi embedded (article link However, I got stuck very quickly.


For example, in our app, we use this nuget package (Microsoft.PowerBI.Api and powerbi.core), and these are some of our usages:


client.Reports.GetReportsAsync(this.workspaceCollection, this.workspaceId)


client.Reports.DeleteReportAsync(this.workspaceCollection, this.workspaceId, report.Id);


client.Imports.PostImportFileWithHttpMessage(this.workspaceCollection,this.workspaceId,File.OpenRead(localPath), "Main Report");

client.Datasets.GetGatewayDatasourcesAsync(workspaceCollection, workspaceId, dataset.Id);




client.Datasets.GetDatasetsAsync(workspaceCollection, workspaceId);


As workspace collection will be retired, will we still be able to use above methods? If not, are there any alternative functions to use?


Many Thanks



Not applicable

Hi @daxu,

All these could be achieved either by using the c# sdk ( or the PowerBI Rest Api. The sdk now provides a v2 of the functions and it's a wrapper of the Rest api. You may need to change some things but they are quite similar (workspace collection is now called group).
The new PowerBI embedded is provisioned through Azure too and it allows you to suspend the service when you don't need it. If you buy some dedicated capacity, then you can add your app workspace to it and get all the benefits.
If you'd like you can buy Powerbi premium capacity from the power bi service which will handle more demanding reports, but this is bought annually and can't be stopped.

Hope it helps.


Hi @Anonymous


The sdk's documentation seems to stick to workspace collection, using the example from the package's main page

var reportsResult = await client.Reports.GetReportsAsync(workspaceCollection, workspaceId);


I can't see any new methods from the latest package, where are the v2 functions you are talking about?



Not applicable

Hi @daxu,


here is the ReportsExtensions V2  where you can find the "GetReportsAsync" method.


Here is the source code for V2 (


Hope it helps.




Hi  @Anonymous,


I see.

The latest nuget package ( I can get is 1.1.11, which was published in April 2017. If you are the owner of the sdk, is it possible to publish a new version?


many Thanks


Not applicable

Hi @daxu,


you should use the latest version of this package:


The PowerBI SDK is maintained by Microsoft. It would be great if I was the owner 🙂



Hi @Anonymous


many thanks. Turned out I had these using statements in my file, As a result, I never realized there are V2 code in the package.


using Microsoft.PowerBI.Api.V1;
using Microsoft.PowerBI.Api.V1.Models;

Not applicable

Hi @daxu,


no worries, hope that your issue has been solved.

Please accept a reply as a solution in order to help other people to solve the same problem.





Microsoft Employee
Microsoft Employee

Hi @daxu,


I'm afraid we can't use it in the new scenario. Please have a look at the explanations below.

1. From the #rebuild-your-application, we can see we need to use REST APIs instead, which are different from the old ones.

>>>You will need to modify your application to use the Power BI REST APIs and the report location inside


2. The REST APIs have the similar functions and more new features. Please refer to library/mt631672.aspx.


3. I think the point is the Workspace collections is based on Azure while the Power BI embedded is based on Power BI Service. Please refer to embedded-faq#what-is-power-bi-workspace-collection.

Other references:




Best Regards,


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

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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