1

To prevent lose of setting like scheduled refresh time, are there any ways to change the .pbix filename (i.e. report name in PowerBI console)? Thus, if want to change the content and filename, how to do that?

Below is my current code that can only base on workspaceId and datasetName(.pbix filename).

using var client = new PowerBIClient(new Uri(_apiUrl), _tokenCredentials) {HttpClient = {Timeout = TimeSpan.FromMinutes(5)}};

// Import PBIX file from the file stream with Overwrite Method present
import = await client.Imports.PostImportWithFileAsync(new Guid(workspaceId), fileStream, datasetName, ImportConflictHandlerMode.CreateOrOverwrite, cancellationToken: cancellationToken);
DaiKeung
  • 1,077
  • 1
  • 19
  • 38

1 Answers1

1

You can use CloneReportRequest API to save your report. You need to provide the name, targetWorkspaceId and targetModelId

public CloneReportRequest (string name = default, string targetWorkspaceId = default, string targetModelId = default);

Reference:

CloneReportRequest Constructor (Microsoft.PowerBI.Api.V2.Models) - Azure for .NET Developers | Microsoft Docs

Rahul Roy
  • 275
  • 1
  • 10