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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Get the Power BI Tenant ID via Power Query

Is there a way for Power Query to read the Power BI Tenant ID for the Power BI Tenant that the Power Query commands are running in?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Run this API call Admin - Get Capacities As Admin - REST API (Power BI Power BI REST APIs) | Microsoft Docs

It also includes the tenant IDs.

 

Out of curiosity - how many tenants do you have?  Usually the tenant ID is a well known constant.

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Run this API call Admin - Get Capacities As Admin - REST API (Power BI Power BI REST APIs) | Microsoft Docs

It also includes the tenant IDs.

 

Out of curiosity - how many tenants do you have?  Usually the tenant ID is a well known constant.

Anonymous
Not applicable

Thanks for the suggestion.  I had not thought about that approach.

 

I have found a way to achieve my actual end goal, so I don't need this exact data at this time.

 

It would be nice to be able to know what Dataset ID, Workspace ID, and/or Tenant ID, etc. that the Power Query steps are running in, without having to grant API access or provide the necessary API credentials. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors