Forum Discussion
PowerShell REST APIs - getting list of all reports in the tenant
- 6 years ago
Dear Scott,
Not sure if anyone has gotten back to you, or if you've solved it yourself, but I recently set up a Tenancy overview report using the Power Shell cmdlets and rest API in Power BI and noticed teh same.
With a bit of investigation i noticed that they aren't acutally DELETED reports, they're Reports that have been Published via APPS as the Report ID and Dataset ID are different to the Reports stored in the Workspace. This is because different versions can exist in both spaces, and an App report doesn't automatically get replaced when publishing a new report to a workspace.
I found this out by using the cmdlet Invoke-PowerBIRestMethod -url 'Apps' -Method Get to retrieve published apps and their reports.
It's also worth noting that this only occurs when using the -scope Organization on Get-Reports.
The way i dealt with this was those ReportID's that matched when using the invoke-powerbirestmethod were published reports and datasets, those that didn't were Workspace Reports (unpublished). This gave me a much cleaner overview of the tenancy.
Hope this helps.
Chris
Does anyone have an idea how to list all users per report? I would like to pass the report name rather than going through all reports. I was not able to find that while googling.
Thanks,
Stan
If you have admin privleges, I recommend this admin api call, possible new api since this first posted. I was getting errors because of too many api calls. This is one stop shopping.