<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can local PySpark access OneLake using ABFSS paths? in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4912687#M14449</link>
    <description>&lt;P&gt;just a heads up i am still trying to get more than entra level access to the account to try this solution.&lt;BR /&gt;will update soon&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jan 2026 16:57:37 GMT</pubDate>
    <dc:creator>dead_DE</dc:creator>
    <dc:date>2026-01-05T16:57:37Z</dc:date>
    <item>
      <title>Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4909090#M14286</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Hi everyone,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I’m new to Fabric and Azure, and I’m trying to set up a local development workflow.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I’m running PySpark inside a container on my machine. I can access Microsoft Fabric using only my Microsoft Entra ID (no Azure subscription tied to me personally). Using azure.identity, I’m able to generate tokens and successfully access files in OneLake through the Python SDK.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I &lt;EM&gt;haven’t&lt;/EM&gt; been able to do is configure my local Spark environment to use these tokens to read data directly from OneLake using abfss:// paths. Every attempt to configure the ABFS drivers fails, and I’ve seen some comments suggesting that this scenario isn’t currently supported.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Right now it looks like the only viable approach for local Spark development is to download the files from OneLake (via the SDK) and work with them locally, essentially mirroring the Lakehouse on my machine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Given that my access is limited, I’m wondering:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Is there &lt;EM&gt;any&lt;/EM&gt; supported way to authenticate Spark directly against OneLake from outside Fabric?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;If token‑based access isn’t possible, is there another authentication method or permission I could request that would allow this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Any guidance or clarification would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Dec 2025 23:07:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4909090#M14286</guid>
      <dc:creator>dead_DE</dc:creator>
      <dc:date>2025-12-26T23:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4909109#M14287</link>
      <description>&lt;P&gt;I'm not sure about ABFSS paths, but I've successfully accessed data in OneLake using the ADLS dfs endpoints.&lt;BR /&gt;I tend to use SPN (rather than organization) credentials, but it works just fine.&lt;BR /&gt;I've connected to the SQL Endpoint too.&lt;BR /&gt;Having had a read around, this may be of use;&lt;BR /&gt;&lt;A href="https://christianhenrikreich.medium.com/microsoft-fabric-diving-into-lakehouse-access-from-local-machines-and-other-remotes-with-delta-rs-79faa6cf1fdf" target="_blank" rel="noopener"&gt;https://christianhenrikreich.medium.com/microsoft-fabric-diving-into-lakehouse-access-from-local-machines-and-other-remotes-with-delta-rs-79faa6cf1fdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If this helps, please &lt;EM&gt;&lt;STRONG&gt;Accept as a Solution&lt;/STRONG&gt;&lt;/EM&gt; to help others find it more easily.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Dec 2025 01:47:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4909109#M14287</guid>
      <dc:creator>spencer_sa</dc:creator>
      <dc:date>2025-12-27T01:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4909212#M14288</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1475107"&gt;@dead_DE&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use local spark to access your OneLake storage, however you'd have to use a service principal. These are the prerequisites and the steps involved -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&lt;SPAN&gt; Make sure your Fabric tenant allows external apps&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;Your Fabric admin must enable:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Users can access data stored in OneLake with apps external to Fabric&lt;/LI&gt;&lt;LI&gt;(For SPs) Service principals can call Fabric public API&lt;BR /&gt;Then grant your service principal Contributor (or above) to the Fabric workspace.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Collect the OneLake ABFSS path&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;OneLake uses ADLS Gen2‑compatible URIs. The account name is always onelake, and the filesystem is your workspace name (or GUID). Typical pattern:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;abfss://&amp;lt;workspaceName or workspaceGUID&amp;gt;@onelake.dfs.fabric.microsoft.com/&amp;lt;lakehouseName or itemGUID&amp;gt;.lakehouse/Files/&lt;DIV&gt;&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;H3&gt;3. Ensure your local Spark has the ABFS connector&lt;/H3&gt;&lt;P&gt;You need Hadoop’s hadoop-azure (ABFS) + azure-storage bits on the classpath.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;H3&gt;4. Create a Microsoft Entra service principal&lt;/H3&gt;&lt;P&gt;Record Tenant (Directory) ID, Client ID (Application ID), and Client Secret, and grant the SP access to your Fabric workspace&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;5. Configure Spark for ABFS OAuth against OneLake host&lt;DIV&gt;&lt;P&gt;&lt;!--      ScriptorStartFragment      --&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="python"&gt;pyspark \
  --conf "fs.azure.account.auth.type.onelake.dfs.fabric.microsoft.com=OAuth" \
  --conf "fs.azure.account.oauth.provider.type.onelake.dfs.fabric.microsoft.com=org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider" \
  --conf "fs.azure.account.oauth2.client.id.onelake.dfs.fabric.microsoft.com=&amp;lt;APP_CLIENT_ID&amp;gt;" \
  --conf "fs.azure.account.oauth2.client.secret.onelake.dfs.fabric.microsoft.com=&amp;lt;APP_CLIENT_SECRET&amp;gt;" \
  --conf "fs.azure.account.oauth2.client.endpoint.onelake.dfs.fabric.microsoft.com=https://login.microsoftonline.com/&amp;lt;TENANT_ID&amp;gt;/oauth2/token"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly accept this solution if it solves your problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Dec 2025 14:05:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4909212#M14288</guid>
      <dc:creator>deborshi_nag</dc:creator>
      <dc:date>2025-12-27T14:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4909222#M14291</link>
      <description>&lt;P&gt;thank you, i will look into getting a service principal from my organization and check back on this some time this upcoming week.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Dec 2025 15:36:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4909222#M14291</guid>
      <dc:creator>dead_DE</dc:creator>
      <dc:date>2025-12-27T15:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4910852#M14369</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1445078"&gt;@deborshi_nag&lt;/a&gt;&amp;nbsp;, Thank you for reaching out to the Microsoft Community Forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We find the answer shared by&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1445078"&gt;@deborshi_nag&lt;/a&gt;&amp;nbsp;&amp;nbsp;is correct. Can you please confirm if the solution worked for you. It will help others with similar issues find the answer easily.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1445078"&gt;@deborshi_nag&lt;/a&gt;&amp;nbsp; for your valuable response.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 11:58:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4910852#M14369</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2025-12-31T11:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4912468#M14444</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1475107"&gt;@dead_DE&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;SPAN data-teams="true"&gt;Hope you're doing fine. Can you confirm if the problem is solved or still persists? Sharing your details will help others in the community.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2026 11:36:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4912468#M14444</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2026-01-05T11:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4912687#M14449</link>
      <description>&lt;P&gt;just a heads up i am still trying to get more than entra level access to the account to try this solution.&lt;BR /&gt;will update soon&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2026 16:57:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4912687#M14449</guid>
      <dc:creator>dead_DE</dc:creator>
      <dc:date>2026-01-05T16:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4912842#M14451</link>
      <description>&lt;P&gt;I have personally used cli to login to Fabric Tenant and used Azure.Identity to authenticate and this has worked for me to connect and test things in local ,though it may not be suitable for production deployments .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;az login --allow-no-subscriptions --tenant &amp;lt;TenantId&amp;gt;
from azure.identity import DefaultAzureCredential
delta_token = DefaultAzureCredential().get_token("https://storage.azure.com/.default").token
storage_options = {"bearer_token": delta_token, "use_fabric_endpoint": "true"}
DELTA_TABLE_PATH: str = '&amp;lt;complete abfss path of the lakehouse in Fabric&amp;gt;'
df = DeltaTable(DELTA_TABLE_PATH, storage_options=storage_options)
print(df.to_pandas().head(10))&lt;/LI-CODE&gt;&lt;P&gt;If this code helps ,&lt;STRONG&gt;Accept as a Solution&lt;/STRONG&gt; to help others as well&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2026 04:10:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4912842#M14451</guid>
      <dc:creator>AparnaRamakris</dc:creator>
      <dc:date>2026-01-06T04:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4912848#M14452</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1475107"&gt;@dead_DE&lt;/a&gt;&amp;nbsp;, Thanks for the update. Hope you will get the access soon. Please share the details here once you had a chance to try it.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2026 04:38:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4912848#M14452</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2026-01-06T04:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4913070#M14454</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1362290"&gt;@AparnaRamakris&lt;/a&gt;&amp;nbsp;I agree, connecting to Fabric OneLake from local Python (Pandas) is not an issue - it works! I think the user was trying to connect local Spark to Fabric, which is slightly different.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2026 09:55:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4913070#M14454</guid>
      <dc:creator>deborshi_nag</dc:creator>
      <dc:date>2026-01-06T09:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4921946#M14666</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Here’s where I’m currently stuck. I’ve been told that we need to create an Azure App Registration for programmatic access. However, when I create the App Registration, I don’t see any way to associate it directly with Fabric or OneLake. Because of that, I’m not sure how to ensure the app gets the correct permissions or how to generate the right client ID for Fabric access.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I also can’t just ask IT to give me broad permissions to all of Blob Storage and hope that covers wherever OneLake lives. Everything I’ve read suggests authenticating to Fabric programmatically by generating a token through the Azure CLI, but that’s what led me here&amp;nbsp;since there’s no public Spark driver that supports that token flow yet.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jan 2026 15:30:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4921946#M14666</guid>
      <dc:creator>dead_DE</dc:creator>
      <dc:date>2026-01-20T15:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4922012#M14667</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1475107"&gt;@dead_DE&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's how you can create a service principle or SPN. If there's a team who creates SPN for you in your organisation, they'd know this.&lt;/P&gt;&lt;DIV&gt;&lt;UL&gt;&lt;LI&gt;Go to Entra ID portal&lt;BR /&gt;&amp;gt; Applications&amp;nbsp;&amp;gt; App registrations&amp;nbsp;&amp;gt; New registration&lt;/LI&gt;&lt;LI&gt;Note the:&lt;UL&gt;&lt;LI&gt;Client ID (App ID)&lt;/LI&gt;&lt;LI&gt;Tenant ID&lt;/LI&gt;&lt;LI&gt;Client Secret&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A tenant setting must be changed for SPN to access a Fabric workspace.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tenant Settings &amp;gt; Developer Settings &amp;gt; “Service principals can use Fabric APIs”&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;Next you need to assign the SPN Contributor access to your workspace&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;In Fabric:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Open the Workspace&lt;/LI&gt;&lt;LI&gt;Select Manage access&lt;/LI&gt;&lt;LI&gt;Click Add people or groups&lt;/LI&gt;&lt;LI&gt;Search for your App Registration name (NOT the GUID!)&lt;UL&gt;&lt;LI&gt;SPNs show up by the registered application name&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Assign an appropriate role:&lt;UL&gt;&lt;LI&gt;Contributor (usually recommended)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Once both the steps are done, you can follow the message I posted on this thread earlier. By assigning the SPN Contributor access to the workspace allows it to write to OneLake.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 20 Jan 2026 17:02:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4922012#M14667</guid>
      <dc:creator>deborshi_nag</dc:creator>
      <dc:date>2026-01-20T17:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4926327#M14741</link>
      <description>&lt;P&gt;TY for this, I will check with IT on monday!&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jan 2026 00:16:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4926327#M14741</guid>
      <dc:creator>dead_DE</dc:creator>
      <dc:date>2026-01-24T00:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can local PySpark access OneLake using ABFSS paths?</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4938805#M14814</link>
      <description>&lt;P&gt;Following the guide above on creating a SPN i was able to get set up with a App cleint id and and app client secret.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My container running spark needed some configuring as well.&amp;nbsp; I had to set it up with Delta Lake Jars and Azure Blob Storage configurations.&lt;BR /&gt;&lt;BR /&gt;Full Example of how i got this to work&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyspark.sql import SparkSession
# Create Spark session with Java 17 compatibility
spark = (SparkSession.builder
    .appName("OneLakeAccess")
    .master("local[*]")
    .config("spark.jars.packages", "org.apache.hadoop:hadoop-azure:3.3.4,io.delta:delta-spark_2.12:3.1.0")
    .config("spark.sql.extensions", "io.delta.sql.DeltaSparkSessionExtension")
    .config("spark.sql.catalog.spark_catalog", "org.apache.spark.sql.delta.catalog.DeltaCatalog")
    .config("spark.hadoop.fs.abfss.impl", "org.apache.hadoop.fs.azurebfs.SecureAzureBlobFileSystem")
    .config("spark.hadoop.fs.abfs.impl", "org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem")
    .getOrCreate())

conf = spark.sparkContext._jsc.hadoopConfiguration()

conf.set("fs.azure.account.auth.type.onelake.dfs.fabric.microsoft.com", "OAuth")
conf.set("fs.azure.account.oauth.provider.type.onelake.dfs.fabric.microsoft.com", "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider")
conf.set("fs.azure.account.oauth2.client.id.onelake.dfs.fabric.microsoft.com", APP_CLIENT_ID)
conf.set("fs.azure.account.oauth2.client.secret.onelake.dfs.fabric.microsoft.com", APP_CLIENT_SECRET)
conf.set("fs.azure.account.oauth2.client.endpoint.onelake.dfs.fabric.microsoft.com", f"https://login.microsoftonline.com/{TENANT_ID}/oauth2/token")

df = spark.read.csv(&amp;lt;abfss_path_to_fabric_resource_in_lakehouse&amp;gt;)
df = spark.read.format("delta").load(&amp;lt;abfss_path_to_fabric_delta_table_in_lakehouse&amp;gt;)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I am now able to connect to my fabric Lakehouse Files and Delta Tables with ABFSS paths from my spark container.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jan 2026 00:35:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Can-local-PySpark-access-OneLake-using-ABFSS-paths/m-p/4938805#M14814</guid>
      <dc:creator>dead_DE</dc:creator>
      <dc:date>2026-01-28T00:35:17Z</dc:date>
    </item>
  </channel>
</rss>

