Forum Discussion
Logic App Connection With Microsoft OneLake
- 1 year ago
Hi BhaskarMishra ,
Thanks for reaching out to the Microsoft fabric community forum.
Since there’s no direct connector for OneLake in Logic Apps, a common workaround is to use Azure Data Factory or Azure Functions to bridge the gap. You can configure an Azure Function to authenticate with OneLake using Managed Identity or OAuth 2.0, then expose an HTTP endpoint that Logic Apps can call. Another approach is to use Azure Storage Account as an intermediary store the attachments there first, then move them to OneLake using a scheduled pipeline in Microsoft Fabric. If authentication is the main issue, ensure that your token request follows the correct OAuth flow, and test API calls using Postman before integrating them into Logic Apps.
Solved: Re: Retrieve Attachments from Email and Save to On... - Microsoft Fabric Community
Solved: Pushing Data from Function App to One Lake - Microsoft Fabric Community
If this post helped resolve your issue, please consider giving it Kudos and marking it as the Accepted Solution. This not only acknowledges the support provided but also helps other community members find relevant solutions more easily.
We appreciate your engagement and thank you for being an active part of the community.
Best regards,
LakshmiNarayana.
Hi BhaskarMishra ,
You’re definitely not alone in facing this challenge—direct Logic Apps to OneLake integration is a common roadblock due to the lack of a native connector and the complexities around authentication. Here’s a practical, step-by-step approach to make this work reliably:
Azure Function as a Bridge (Recommended):
- Create an Azure Function that authenticates to OneLake using a Managed Identity or Service Principal with the correct permissions.
- In your Azure Function, use the Microsoft Graph or Fabric REST API to upload files to OneLake. Make sure your function can acquire and refresh tokens as needed (OAuth2 flow).
- Expose the Azure Function as an HTTP endpoint.
- In Logic Apps, use the HTTP action to POST your email attachments to the Azure Function endpoint. The function handles all the OneLake authentication and upload logic.
- This method isolates all the tricky authentication from Logic Apps and gives you full control/flexibility.
Azure Data Factory (ADF) or Microsoft Fabric Pipelines:
- If you already use ADF or Fabric Data Pipelines, you can have Logic Apps drop the attachments into an Azure Storage Account (Blob Storage).
- Then, schedule a pipeline to move files from the storage account into OneLake. This is robust, scalable, and keeps authentication straightforward.
Key Things to Check:
- For Function authentication, ensure your app registration/service principal has the correct API permissions for OneLake (usually delegated or application permissions).
- Use tools like Postman to test the authentication and file upload flow before wiring it up to Logic Apps.
- Double-check that you are using the correct OAuth 2.0 endpoints and scopes for the Fabric/OneLake API access.
By introducing a small Azure Function layer, you can overcome the current authentication and connectivity limitations. This pattern is used successfully in many enterprise setups for similar scenarios.
If this helps, please consider marking the response as Accepted Solution so others with the same problem can find it easily. Let me know if you need example code or further details at any step!