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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jhrc_lda
Frequent Visitor

Clone report for PowerBi embedded

Hi,

 

Are you guys able to clone reports with the Api.Core library? This is what I'm trying to do:

 

1) I have a report in workspace X

2) Want to clone the report from workspace X to workspace Y

3) I'm not specifying the dataset id, as it is an optional value and I assume will be cloned as well

 

This is the code I'm trying:

 

            var cloneReportRequest = new CloneReportRequest(newName, targetWorkspaceId);
            var credentials = new TokenCredentials(Utils.accessKey, "AppKey");
            var client = new PowerBIClient(credentials);
            client.BaseUri = new Uri(Utils.apiEndpointUri);
            Report report;

            using (client)
            {
                report = client.Reports.CloneReport(
                        workspaceCollectionName,
                        workspaceId,
                        reportId,
                        cloneReportRequest);
            }

I have tried the provision sample for PowerBI Embeded, PowerCli and the code above. All of them return "Bad Request". There is not much documentation on it other than: https://docs.microsoft.com/de-ch/dotnet/api/microsoft.powerbi.api.v1.reportsextensions.clonereport?v...

 

The same config works to create reports, generate embed tokens, etc.

 

Any suggestion is appareciated.

 

Thanks,

4 REPLIES 4
arinah
Microsoft Employee
Microsoft Employee

Hey Guys,

 

Please follow the MSDN API specification here: https://msdn.microsoft.com/en-us/library/mt784674.aspx.

Clone API within workspace and across workspaces is available for a while both for the old (deprecated) Azure embedding using app key authenication and through the new way of embdding using user AAD token to Power BI.

Actually this API is availbale for every Power BI user who whiches to automate his workflow.

I believe the issue you encountered is due to lacking dataset id in the "Y" workspace which is mandatory paramter when cloning reports across workspaces.

 

Let me know in case you encounter any other issues,

Arina

Eric_Zhang
Microsoft Employee
Microsoft Employee

@jhrc_lda

I can reproduce the same issue here. Just raise a issue in the Github lab.

@Eric_Zhang Thanks for your comment!

 

I have tried both, the API and the Provision Sample, none of then worked.

 

Do you have a replied yet?

 

Cheers,

Fairly certain that is deprecated at this point, it doesn't look like there is a "clone" capability on the currently supported version.

 

Api docs

https://msdn.microsoft.com/library/dn877544.aspx

 

c# client sdk for api

https://github.com/Microsoft/PowerBI-CSharp

 

note that the github repo mentioned has not been commited to in awhile, my guess is that it's not being actively maintained.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.