Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
anambedoya
Frequent Visitor

Get dataset hierarchy

Hi all! I'm trying to generate a token (https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/generate-token) to embed the Wall boards - Recruitment report in the web. We have the following structure:

 

anambedoya_1-1706116852239.gif

As you can see, the Recruitment Wallboards dataset uses the Recruitment dataset. Right now, the API to get the report (https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-reports-in-group) is throwing only the Recruitment Wallboards dataset so the API to generate the token fails. Is it possible to get the master dataset through an API?

 

Thank you!

2 REPLIES 2
Anonymous
Not applicable

Hi @anambedoya ,

Thanks for reaching out to us with your problem. Base on your description, it seems that you want to get the involved dataset and master dataset info of the report. You can follow the steps below to get it:

1. Get the own dataset of the report by the following REST API:

Reports - Get Reports In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Datasets - Get Datasets - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

GET https://api.powerbi.com/v1.0/myorg/datasets

 

vyiruanmsft_1-1706162134743.png

2. Get data sources by REST API Datasets - Get Datasources

Datasets - Get Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

GET https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/datasources

 

vyiruanmsft_0-1706162059251.png

Please note that you need to have the appropriate permissions (Dataset.ReadWrite.All or Dataset.Read.All) to use these APIs.

In addition, please review the following thread. Hope its solution can give you some insights or thoughts.

Solved: Data Lineage. can you connect up to the meta data - Microsoft Fabric Community

Metadata and Lineage from Power BI | Microsoft Learn

Best Regards

I'm still unable to get the dataset id of the master dataset. The datasourceId returned in the second API doesn't correspond to the datasetId I need to put in the get embedded token request.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.