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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is 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
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.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.