How can I identify all reports — both Power BI reports and paginated reports — that use a specific dataset?
I am using…
$AllReports = Invoke-PowerBIRestMethod -Url "/admin/reports" -Method Get | ConvertFrom-Json
…to get all reports, even those in My Workspace (for all users).
Then I am using…
$reports = $AllReports.value | Where-Object datasetId -EQ $DatasetId
…hoping to get all reports, anywhere in the system, that use a specific dataset. But only Power BI reports are returned.
The problem I am seeing is that if the report is a Paginated Report, there is no datasetId
property.
I have looked both at the Power BI cmdlets and at the Power BI REST API and have been unable to see how to relate a paginated report to a dataset. I used the REST API for this because the cmdlets appear to not give me access to My Workspace other than my own.
I need to be able to do this in a script. But I am also unable to do this through the GUI. While I can use lineage view to look in a workspace to see what datasets are used by reports in that workspace, I can’t look at a dataset to determine what reports outside of that workspace use it.