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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
AlexisOlson
Super User
Super User

Connect to a XMLA Endpoint with Python

Since the announcement about XMLA endpoints, I've been trying to figure out how to connect to a URL of the form powerbi://api.powerbi.com/v1.0/myorg/[workspace name] via Python, but I can't find anything that works.

 

I have a workspace in a premium capacity and I am able to connect to it using DAX Studio as explained here, but I haven't figured out how to do it with Python. I've tried installing olap.xmla, but I get the following error when I try to use the Power BI URL as the location using either the powerbi or https as the prefix.

import olap.xmla.xmla as xmla
p = xmla.XMLAProvider()
c = p.connect(location="powerbi://api.powerbi.com/v1.0/myorg/[My Workspace]")
[...]
TransportError: Server returned HTTP status 404 (no content available)

 

I'm sure there are authentication issues involved, but I'm a bit out of my depth here. Does anyone know of any blog posts or other resources that demonstrate how to connect to a Power BI XMLA endpoint specifically using Python? My searching has failed me, but surely I can't be the only one who is trying to do this.

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@AlexisOlson ,

 

This error should caused by invalid URL or workspace, please refe to power bi rest api for more details.

https://docs.microsoft.com/en-us/rest/api/power-bi/

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuta-msft 

 

I'm using exactly the same URL that works with DAX Studio, so that doesn't seem like it would be the problem.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.