microsoft / powerbi-powershell

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

New-PowerBI Report giving error code 401 (Unauthorized) #395

Open dgoyal04 opened 1 year ago

dgoyal04 commented 1 year ago

While uploading new report using New-PowerBIReport command, I am getting error code 401 (Unauthorized).

zhunipingan commented 8 months ago

@dgoyal04 Hi, meet the same issue, did you have the solution.

MagAlp commented 5 months ago

I too have problems with the New-PowerBIReport command when connecting using an Service Principal. I tried with my own account and same report and it works just fine. This seems to be an issue only when the report is connected to a Power BI Dataset using the XMLA-endpoints (Analysis Service Connection). If the report is connected to the same dataset with "Get Data from existing Power BI Dataset/Semantic Model", then the powershell command works just fine. This must be an bug in either the powershell cmdlet or in the underlying API POST Import in group.