Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

creating a lakehouse connection using service principal

how to create a new connection to a lakehouse inside my fabric environment using service principal?
  • Anonymous's avatar
    Anonymous
    1 year ago

    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.