Forum Discussion
Get upstream datasets
According to support, there is currently no direct way to get all upstream datasets of a specific model.
The default embedding of reports for customers fails as well because of this without modification, e.g. especially in Power Pages, because the upstream datasets are not retrieved and passed to generate the embedding token.
Workarounds:
1. Call Admin - WorkspaceInfo PostWorkspaceInfo - REST API (Power BI Power BI REST APIs) | Microsoft Learn with lineage = true, then get the result with Admin - WorkspaceInfo GetScanResult - REST API (Power BI Power BI REST APIs) | Microsoft Learn and lookup the data set which will have a upstreamDatasets property
2. Call Datasets - Get Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn for your workspace and data set -> you get the list of datasources by name, which you could use to filter the datasets in the group and get the respective id
3. Merge everything into a single direct lake/query/import source type model.