Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hello,
I have a question, which is kind of frequent, to which I didn't find any conrete solution.
I want to upload/deploy/import Rdl files to power bi service automatically, using a powershell script for example maybe (it is what I'm trying to do now at least, any other solution would be good too, but i prefer this one), but I could not reach any concrete results.
I'm using this script : https://dev.to/kenakamu/upload-rdl-file-s-to-power-bi-via-api-28h I modified the group id and the path to the rdl file in my desktop, and also checked the file's encoding (utf-8) but still nothing.
The error I'm getting now (using the script that i joined as described above) :
Invoke-RestMethod : {"error":{"code":"PaginatedReportInvalidRdlDefinition","pbi.error":{"code":"PaginatedReportInvalidR
dlDefinition","parameters":{},"details":[],"exceptionCulprit":1}}}
Au caractère C:\Users\PMAI05212\Desktop\test_script2.ps1:38 : 15
+ ... $report = Invoke-RestMethod -Uri $url -Method Post -Headers $header ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation : (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebEx
ception
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
There are some questions in the same direction ( I might have checked them all ) but I couldn't find a working solution.
Does anyone have an idea how to do it ? Or what I can do to solve it ?
I changed also the Invoke-RestMethod to Invoke-PowerBIRestMethod but i get the same as this : https://community.powerbi.com/t5/Service/RDL-import-via-API/td-p/1032623
Many thanks.
Hi @Mouad,
Reference to this post may be helpful:
Unable to call imports endpoint · Issue #46 · microsoft/powerbi-powershell · GitHub
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.