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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
WeiD
New Member

How to connect to Power BI's datamarts using ADF or Python?

Hi there,

 

I managed to connect to Power BI datamarts via SSMS, using datamart's Connection Straing and AAD Integrated. However, I can't connect to it using ADF, neither Python.

 

I found a few posts on the internet, but I don't think they still work. They seem need the server name and database name, etc. Currently PowerBI datamarts's Connection string is in the form of ".....datamart.fabric.microsoft.com". Has anyone managed to connect using ADF, and also Python? Thanks.

1 ACCEPTED SOLUTION
WeiD
New Member

Ok, I got confirmation from Microsoft that ADF and Python connection are not supported at the moment. I raised this idea on Microsoft Idea. If you have the same requirement, please help to vote it up. Thanks.

View solution in original post

3 REPLIES 3
WeiD
New Member

Ok, I got confirmation from Microsoft that ADF and Python connection are not supported at the moment. I raised this idea on Microsoft Idea. If you have the same requirement, please help to vote it up. Thanks.

lbendlin
Super User
Super User

Thanks @lbendlin . Yes I tried this previously, but stuck with what values to use for "server name" and "database name" in the Connection string. Because in the SSMS connection, all I need to put in is the Power BI datamart's Connection string (in the form of ".....datamart.fabric.microsoft.com"). 

 

Also I had issue with below code. 

token_bytes = credential.get_token("https://https://database.windows.net/.default").token.encode("UTF-16-LE")

 

My initial guess is that PowerBI datamart connection probably needs some specific treatment, comparing to normal Azure SQL Database connection. 

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.