microsoft / powerbi-powershell

PowerShell community for Microsoft PowerBI. Here you will find resources and source for PowerShell modules targeting PowerBI.
MIT License
346 stars 120 forks source link

Export-PowerBIReport failing with An error occurred while sending the request #237

Open stockmoneymaker opened 4 years ago

stockmoneymaker commented 4 years ago

I have a powershell script that logs in and downloads reports from a workspace. It has been working fine until recently the account I was using had its password expire. I logged in and updated the password and then updated my script. The script now logs in but when it gets ready to export the report it fails with this error:

Export-PowerBIReport : An error occurred while sending the request.
At C:\Users\awirth\power_bi_download.ps1:39 char:1
+ Export-PowerBIReport -Id $ReportId -OutFile $FinalPath
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...rtPowerBIReport:ExportPowerBIReport) [Export-PowerBIReport], HttpRequestException
+ FullyQualifiedErrorId : An error occurred while sending the request.,Microsoft.PowerBI.Commands.Reports.ExportPowerBIReport

Can you give me some insight as to why I would be receiving this error or what further steps i could take to troubleshoot?

CattieCat commented 4 years ago

Can you try this cmdlet to see if it gives you more information about failure? https://docs.microsoft.com/en-us/powershell/module/MicrosoftPowerBIMgmt.Profile/Resolve-PowerBIError?view=powerbi-ps