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
DanrleiAlves
New Member

Getting DataSource Metadata from datasourceId

Hi all, 


I want to get datasource details (database name, table name) from the datasoureceID, gatewayID or datasourceuniqueID.


I have access to the admin APIs, but couldnt figure out a way to get further detail from the datasources through using the datasourceIDs.

 

The datasource is a synapse data lakehouse, the dashboards connect to synapse tables/views.

3 REPLIES 3
v-lgarikapat
Community Support
Community Support

Hi @DanrleiAlves ,

Thanks for reaching out to the Microsoft Fabric community forum!

 

To retrieve database and table details from a datasource, especially for Synapse Lakehouse connections, you can start with the Gateway Datasource API:

Dataflows - Get Dataflow Data Sources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

If you're trying to extract used tables and fields, check out this community thread Solved: Using Power BI REST API to get list of used tables... - Microsoft Fabric Community it discusses using the Scanner API to get dataset-level metadata like tables, columns, and measures.

 

We truly appreciate your continued engagement and thank you for being an active and valued member of the community.

If you're still experiencing any challenges, please don’t hesitate to reach out — we’d be more than happy to assist you further.

We look forward to hearing from you.

Best regards,
Lakshmi

Thanks for the fast reply.

 

The Dataflows endpoint suggested doesnt give the table name. Gives only the database (in my case everything is in serverless, so not much useful).

DanrleiAlves_0-1753100637776.png

The connection path would give all the information im looking for. But i havent been able to figure out a way to get to that information

 

I thought of using this endpoint https://api.powerbi.com/v1.0/myorg/admin/gateways/{{gatewayId}}/datasources/{{datasourceid}}

based on this doc. Gateways - Get Datasource - REST API (Power BI Power BI REST APIs) | Microsoft Learn

to provide the GatewayID and DatasourceID and hopefully get the path information i need.

 

But im getting this issue:

DanrleiAlves_0-1753102019535.png

Any idea what this might be? Thanks in advance!

Hi @DanrleiAlves ,

Thank you for sharing the error screenshot and for the detailed explanation.

Could you please try the following troubleshooting steps

 

Start by checking your gateway permissions. In the Power BI Service, go to Manage Gateways, find the relevant gateway, and make sure your account or service principal is listed with Admin or Manage access under the Users tab for that datasource. Next, check that your token includes the necessary scopes like Dataset.Read.All and Gateway.Read.All you may also need Tenant.Read.All for broader access. If you're using a service principal, ensure it has been granted access in the Admin Portal. Finally, to confirm the datasource ID, use the API call GET /gateways/{gatewayId}/datasources to list all datasources connected to the gateway

Troubleshoot gateways - Power BI | Microsoft Learn

We truly appreciate your continued engagement and thank you for being an active and valued member of the community.

If you're still experiencing any challenges, please don’t hesitate to reach out  we’d be more than happy to assist you further.

We look forward to hearing from you.

Best regards,
Lakshmi

Best Regards,

Lakshmi

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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