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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.