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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AdityaPrasad
New Member

retrieve source table-level lineage for Power BI reports

Hello,

I’m looking for an automated way to retrieve source table-level lineage for Power BI reports.

Our organization has hundreds of reports, and manually downloading each one to check the source queries or objects is not feasible.

For example:

Power BI Table Name: Sales Data

Source Table Name: Schema: XXMS, Table: DWC_sales_data

Is there a way to automate this process using Power BI REST API, Metadata Scanning, or any other method? Any guidance or best practices would be greatly appreciated!

Thank you.

1 ACCEPTED SOLUTION
nilendraFabric
Super User
Super User

Hello @AdityaPrasad 

 

The Power BI REST API provides a structured way to extract metadata, including lineage information, from your Power BI environment. The Metadata Scanner API, in particular, is designed for extracting detailed metadata about datasets, tables, columns, and their relationships.

 

https://www.brunner.bi/post/complete-semantic-model-lineage-in-the-power-bi-service-1

 

https://powerbi.microsoft.com/en-us/blog/new-scanner-api-scenarios

 

1. List Workspaces: Use the `GetGroupsAsAdmin` API to retrieve all workspace IDs in your tenant.
• Endpoint: `GET https://api.powerbi.com/v1.0/myorg/admin/groups?$top=5000`

 


2. Scan Workspaces: Use the `PostWorkspaceInfo` API to initiate a metadata scan for specific workspaces.
• Endpoint: `POST https://api.powerbi.com/v1.0/myorg/admin/workspaces/getInfo?lineage=True&datasourceDetails=True`
• Include workspace IDs in the request body.

 


3. Retrieve Scan Results: Use the `GetScanResult` API to fetch the scan results containing lineage data.
• Endpoint: `GET https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanResult/{scanId}`

 


4. Parse Results: Extract and analyze the JSON response to identify relationships between Power BI tables and their source tables.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @AdityaPrasad,

I wanted to follow up since we haven't heard back from you regarding our last response. We hope your issue has been resolved.
If the community member's answer your query, please mark it as "Accept as Solution" and select "Yes" if it was helpful.
If you need any further assistance, feel free to reach out.

Please continue using Microsoft community forum.

Thank you,
Pavan.

Anonymous
Not applicable

Hi @AdityaPrasad,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept  as  Solution" and give a 'Kudos' so other members can easily find it.

Thank you,
Pavan.

Anonymous
Not applicable

Hi @AdityaPrasad,

Thank you for reaching out in Microsoft Community Forum.

Thank you @nilendraFabric    for the helpful response.

As suggested by nilendraFabric, I hope this information was helpful. Please let me know if you have any further questions or you'd like to discuss this further. If this answers your question, please "Accept as Solution" and give it a 'Kudos' so others can find it easily.

Please continue using Microsoft community forum.

Regards,
Pavan.

nilendraFabric
Super User
Super User

Hello @AdityaPrasad 

 

The Power BI REST API provides a structured way to extract metadata, including lineage information, from your Power BI environment. The Metadata Scanner API, in particular, is designed for extracting detailed metadata about datasets, tables, columns, and their relationships.

 

https://www.brunner.bi/post/complete-semantic-model-lineage-in-the-power-bi-service-1

 

https://powerbi.microsoft.com/en-us/blog/new-scanner-api-scenarios

 

1. List Workspaces: Use the `GetGroupsAsAdmin` API to retrieve all workspace IDs in your tenant.
• Endpoint: `GET https://api.powerbi.com/v1.0/myorg/admin/groups?$top=5000`

 


2. Scan Workspaces: Use the `PostWorkspaceInfo` API to initiate a metadata scan for specific workspaces.
• Endpoint: `POST https://api.powerbi.com/v1.0/myorg/admin/workspaces/getInfo?lineage=True&datasourceDetails=True`
• Include workspace IDs in the request body.

 


3. Retrieve Scan Results: Use the `GetScanResult` API to fetch the scan results containing lineage data.
• Endpoint: `GET https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanResult/{scanId}`

 


4. Parse Results: Extract and analyze the JSON response to identify relationships between Power BI tables and their source tables.

lbendlin
Super User
Super User

You may want to consider using Purview, or at least the Scanner API.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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