microsoft / microsoft/powerbi-powershell

Uninformative 'Failed' State in New-PowerBIReport ImportException

Open
#406 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
413
Forks
134
Avg merge
33m
Merged PRs (30d)
1

Description

Hello,

I am reaching out to report an issue encountered with the New-PowerBIReport cmdlet in the Power BI PowerShell module. The cmdlet fails to upload a report to a Power BI workspace, resulting in an ImportException that provides little to no useful information for diagnosing the root cause.

Error Logs:

Exception : Microsoft.PowerBI.Common.Api.Reports.ImportException: The import was not successful for import ID
'00000000-0000-000-0000-00000000', report name 'name.pbix'. The import
state was 'Failed'.
at Microsoft.PowerBI.Common.Api.Reports.ReportsClient.PostReportForWorkspace(Guid workspaceId,
String reportName, String filePath, ImportConflictHandlerModeEnum nameConflict, Int32 timeout)
at Microsoft.PowerBI.Commands.Reports.NewPowerBIReport.ExecuteCmdlet()
at Microsoft.PowerBI.Commands.Common.PowerBICmdlet.ProcessRecord()
InnerException : False
Message : The import was not successful for import ID '00000000-0000-000-0000-00000000', report name
'name.pbix'. The import state was 'Failed'.
StackTrace : at Microsoft.PowerBI.Common.Api.Reports.ReportsClient.PostReportForWorkspace(Guid workspaceId,
String reportName, String filePath, ImportConflictHandlerModeEnum nameConflict, Int32 timeout)
at Microsoft.PowerBI.Commands.Reports.NewPowerBIReport.ExecuteCmdlet()
at Microsoft.PowerBI.Commands.Common.PowerBICmdlet.ProcessRecord()
Source : Microsoft.PowerBI.Common.Api

The message indicating the import state as 'Failed' provides no meaningful insight or actionable information to help identify or troubleshoot the underlying issue. This lack of detail is particularly challenging, as it hinders our ability to diagnose and resolve the problem effectively.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ReportsClient.PostReportForWorkspace and NewPowerBIReport.ExecuteCmdlet, which are the stack-trace entry points mentioned in the report. Reproduce the failed New-PowerBIReport import and determine what diagnostic information is available; done means the resulting ImportException provides actionable failure details instead of only reporting a Failed state.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.