Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello Everyone, I want to read files from Onelake lakehouse in my function app or local setup, can someone help me connect to the lakehouse and get the files, also I would want to write some data back to the lakehouse.
I know we can refer to the storage similar to the ADLS gen2, but how do I authenticate my client to get the files from the Lakehouse, what permissions are needed to do so ?
Solved! Go to Solution.
Hi @AdarshPanasri ,
To connect to OneLake Lakehouse and perform read/write operations, you can follow the steps below:
You can use Microsoft Entra ID to authenticate your client.
Here is a Python example:
First, run the following statement to install the required packages.
pip install azure-identity azure-storage-file-datalake
To authenticate, replace <your-tenant-id>, <your-client-id>, and <your-client-secret> with your actual tenant ID, client ID, and client secret, respectively.
from azure.identity import ClientSecretCredential
from azure.storage.filedatalake import DataLakeServiceClient
tenant_id = "<your-tenant-id>"
client_id = "<your-client-id>"
client_secret = "<your-client-secret>"
credential = ClientSecretCredential(tenant_id, client_id, client_secret)
service_client = DataLakeServiceClient(account_url=https://<your-account-name>.dfs.core.windows.net, credential=credential)
Regarding identity verification, this article may be helpful to you:
How to use service principal authentication to access Microsoft Fabric's OneLake (dataroots.io)
Regarding your question about permissions, there are two aspects.
Read permissions:
Write permissions:
If you have any questions or need further help, feel free to contact me!
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @AdarshPanasri ,
To connect to OneLake Lakehouse and perform read/write operations, you can follow the steps below:
You can use Microsoft Entra ID to authenticate your client.
Here is a Python example:
First, run the following statement to install the required packages.
pip install azure-identity azure-storage-file-datalake
To authenticate, replace <your-tenant-id>, <your-client-id>, and <your-client-secret> with your actual tenant ID, client ID, and client secret, respectively.
from azure.identity import ClientSecretCredential
from azure.storage.filedatalake import DataLakeServiceClient
tenant_id = "<your-tenant-id>"
client_id = "<your-client-id>"
client_secret = "<your-client-secret>"
credential = ClientSecretCredential(tenant_id, client_id, client_secret)
service_client = DataLakeServiceClient(account_url=https://<your-account-name>.dfs.core.windows.net, credential=credential)
Regarding identity verification, this article may be helpful to you:
How to use service principal authentication to access Microsoft Fabric's OneLake (dataroots.io)
Regarding your question about permissions, there are two aspects.
Read permissions:
Write permissions:
If you have any questions or need further help, feel free to contact me!
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Fabric update to learn about new features.
| User | Count |
|---|---|
| 15 | |
| 5 | |
| 3 | |
| 2 | |
| 2 |