Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedJoin us at the 2025 Microsoft Fabric Community Conference. March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for $400 discount. Register now
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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Fabric update to learn about new features.
User | Count |
---|---|
29 | |
3 | |
2 | |
2 | |
2 |
User | Count |
---|---|
16 | |
8 | |
7 | |
5 | |
4 |