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

Join the OneLake & Platform Admin teams for an ask US anything on July 16th. Join now.

Reply
mrigank_1
New Member

creating a lakehouse connection using service principal

how to create a new connection to a lakehouse inside my fabric environment using service principal?

1 ACCEPTED SOLUTION
v-shamiliv
Community Support
Community Support

Hi @LarsKemmann @carlosgeovany 

Thanks for the screenshots and clarification they’re really helpful.

You’re right, currently Dataflow Gen2 doesn’t support Service Principal authentication when connecting to a Lakehouse. The only available option in the UI is using an Organizational Account, even if your Service Principal is an Admin in the workspace.

Service Principals can be used to access a Lakehouse via Notebooks or APIs by using Azure AD tokens, but not yet through Dataflow Gen2. The error you're seeing( 24559 DML statements not supported) is likely due to this limitation — Dataflows require a user-based connection to perform write operations.

Your workaround using Azure SQL is creative, but writing to Lakehouse from Dataflows still requires a user context, so it runs into the same issue.

For now, we recommend using a user account for Dataflow connections. If you need to automate using a Service Principal, consider using a Notebook instead

If this solution helps, please consider giving us Kudos and accepting it as the solution so that it may assist other members in the community
Thank you.

View solution in original post

7 REPLIES 7
v-shamiliv
Community Support
Community Support

Hi @LarsKemmann @carlosgeovany 

Thanks for the screenshots and clarification they’re really helpful.

You’re right, currently Dataflow Gen2 doesn’t support Service Principal authentication when connecting to a Lakehouse. The only available option in the UI is using an Organizational Account, even if your Service Principal is an Admin in the workspace.

Service Principals can be used to access a Lakehouse via Notebooks or APIs by using Azure AD tokens, but not yet through Dataflow Gen2. The error you're seeing( 24559 DML statements not supported) is likely due to this limitation — Dataflows require a user-based connection to perform write operations.

Your workaround using Azure SQL is creative, but writing to Lakehouse from Dataflows still requires a user context, so it runs into the same issue.

For now, we recommend using a user account for Dataflow connections. If you need to automate using a Service Principal, consider using a Notebook instead

If this solution helps, please consider giving us Kudos and accepting it as the solution so that it may assist other members in the community
Thank you.

v-shamiliv
Community Support
Community Support

Hi @mrigank_1 

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

 

v-shamiliv
Community Support
Community Support

Hi @mrigank_1 
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 it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

v-shamiliv
Community Support
Community Support

Hi @mrigank_1 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-shamiliv
Community Support
Community Support

Hi @mrigank_1 
Thank you for reaching out microsoft fabric community forum.

To connect to a Lakehouse in Microsoft Fabric using a Service Principal, follow these steps:

  1. Register a Service Principal

    • In Azure Portal, go to Azure AD > App registrations, register an app, and note the Client ID, Tenant ID, and Client Secret.

  2. Grant Access in Fabric

    • Go to your Fabric workspace, open Settings > Permissions, and add the Service Principal with a Member or Admin role.

  3. Create the Connection

    • When creating a new connection (in a Dataflow Gen2, Pipeline, or Notebook), select Lakehouse as the target.

    • Choose Service Principal authentication, and enter the Tenant ID, Client ID, and Client Secret.

    • Save and test the connection.

      If this solution helps, please consider giving us Kudos and accepting it as the solution so that it may assist other members in the community
      Thank you.

Hi @v-shamiliv 

 

I'm having the same issue here, trying to connect to the Lakehouse but I don't see the option to use service principal, only organizational account.

 

carlosgeovany_0-1747395934664.png

My service principal is and admin int the workspace:

carlosgeovany_1-1747396057436.png

I even tried the Azure SQL Server DB connector and it create the connection and load the tables and schemas:

carlosgeovany_3-1747396392421.png

 

carlosgeovany_4-1747396465426.png

 

but when publish the Dataflow got this error 24559 DML statemements:

carlosgeovany_2-1747396177656.png

 

 

@v-shamiliv Did you see this reply from @carlosgeovany? Your suggested solution does not work. I can confirm; I have the same issue as @carlosgeovany -- there's no option to sign in with anything other than an organizational account when creating a new connection in this context. What are we missing?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors