Uninformative 'Failed' State in New-PowerBIReport ImportException #406
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.