<?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: S60 Eliminate SPN secrets - Connect Azure Databricks to ADLS Gen2 , Gen1 via custom AD token in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78692#M3409</link>
    <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/112114"&gt;@ramesitexp&lt;/a&gt;&amp;nbsp;Yes&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;is correct for now only valid option is below :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OAuth 2.0 with a Microsoft Entra ID service principal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Shared access signatures (SAS)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Account keys&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now we are using&amp;nbsp;&lt;EM&gt;OAuth 2.0 with a Microsoft Entra ID service principal&amp;nbsp; with client secret not certificate .&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 14 Jul 2024 12:56:32 GMT</pubDate>
    <dc:creator>iakshaykr</dc:creator>
    <dc:date>2024-07-14T12:56:32Z</dc:date>
    <item>
      <title>S60 Eliminate SPN secrets - Connect Azure Databricks to ADLS Gen2 , Gen1 via custom AD token</title>
      <link>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/73106#M3107</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Hi Team,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;In Azure Databricks, we currently use Service Principal when creating Mount Points to Azure storage ( ADLS Gen1, ADLS Gen 2 and Azure Blob Storage).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;As part of S360 action to eliminate SPN secrets, we were asked to move to SPN+certificate / MSI/ User Assigned Managed Identity.&lt;/P&gt;&lt;P&gt;We tried connecting using a custom Active directory (AD) token rather than a client secret through databricks. PEM certificate was used to generate the custom AD token through Java code. We tried to pass the AD token via OAUTH2 method setting below spark configuration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%scala&lt;/P&gt;&lt;P&gt;// Set up Spark configurations for ADLS Gen2 access with Azure AD token&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;spark.conf.set("fs.azure.account.auth.type.&amp;lt;Your storage Account&amp;gt;.dfs.core.windows.net", "OAuth")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;spark.conf.set("fs.azure.account.oauth.provider.type.&amp;lt;Your storage Account&amp;gt;.dfs.core.windows.net", "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;spark.conf.set("fs.azure.account.oauth2.client.id.&amp;lt;Your storage Account&amp;gt;.dfs.core.windows.net", "clientid")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;spark.conf.set("fs.azure.account.oauth2.client.secret.&amp;lt;Your storage Account&amp;gt;.dfs.core.windows.net", "")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;spark.conf.set("fs.azure.account.oauth2.client.endpoint.&amp;lt;Your storage Account&amp;gt;.dfs.core.windows.net",&lt;A href="https://login.microsoftonline.com/%3cTenanant-Id%3e/oauth2/v2.0/token" target="_blank" rel="noopener nofollow noreferrer"&gt;https://login.microsoftonline.com/&amp;lt;Tenanant-Id&amp;gt;/oauth2/v2.0/token&lt;/A&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;spark.conf.set("fs.azure.account.oauth2.access.token.provider", access_token)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;To link to an ADLS Gen 2 storage account and access files, we are encountering the following issue.&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;SPAN&gt;Please refer the attachment to attach error screenshot&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If you come across similar issue would you be able to help?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jun 2024 20:12:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/73106#M3107</guid>
      <dc:creator>rameshkumar610</dc:creator>
      <dc:date>2024-06-12T20:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: S60 Eliminate SPN secrets - Connect Azure Databricks to ADLS Gen2 , Gen1 via custom AD token</title>
      <link>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78672#M3404</link>
      <description>&lt;P&gt;I don’t think SPN certificate is supported by spark configuration.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2024 20:43:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78672#M3404</guid>
      <dc:creator>iakshaykr</dc:creator>
      <dc:date>2024-07-13T20:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: S60 Eliminate SPN secrets - Connect Azure Databricks to ADLS Gen2 , Gen1 via custom AD token</title>
      <link>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78676#M3405</link>
      <description>&lt;P&gt;This is an old way of mounting storage account. Is there any reason why you guys are not using unity catalog? Because if you have unity catalog assigned to your workspace, you can just create databricks access connector (databricks managed identity) and configure access to external location using this managed identity.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2024 06:37:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78676#M3405</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-07-14T06:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: S60 Eliminate SPN secrets - Connect Azure Databricks to ADLS Gen2 , Gen1 via custom AD token</title>
      <link>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78679#M3406</link>
      <description>&lt;P&gt;Hello, &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;. We would want to authenticate using a Custom Token or a Keyvault Certificate rather than a secret value or other keys. If we use managed identity, we must set the complete resource level to restrict the access. We would like to authenticate using cluster or notebook level authentication...&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2024 08:01:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78679#M3406</guid>
      <dc:creator>ramesitexp</dc:creator>
      <dc:date>2024-07-14T08:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: S60 Eliminate SPN secrets - Connect Azure Databricks to ADLS Gen2 , Gen1 via custom AD token</title>
      <link>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78683#M3407</link>
      <description>&lt;P&gt;Unfortunately, the way you're currently trying to do this is not supported by databricks. The only valid authentication options are listed in below article:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/connect/storage/azure-storage#--connect-to-azure-data-lake-storage-gen2-or-blob-storage-using-azure-credentials" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/azure/databricks/connect/storage/azure-storage#--connect-to-azure-data-lake-storage-gen2-or-blob-storage-using-azure-credentials&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/77437928/access-adls-gen2-using-pem-certificate-from-apache-spark" target="_blank"&gt;https://stackoverflow.com/questions/77437928/access-adls-gen2-using-pem-certificate-from-apache-spark&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2024 08:40:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78683#M3407</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-07-14T08:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: S60 Eliminate SPN secrets - Connect Azure Databricks to ADLS Gen2 , Gen1 via custom AD token</title>
      <link>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78692#M3409</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/112114"&gt;@ramesitexp&lt;/a&gt;&amp;nbsp;Yes&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;is correct for now only valid option is below :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OAuth 2.0 with a Microsoft Entra ID service principal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Shared access signatures (SAS)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Account keys&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now we are using&amp;nbsp;&lt;EM&gt;OAuth 2.0 with a Microsoft Entra ID service principal&amp;nbsp; with client secret not certificate .&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2024 12:56:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/s60-eliminate-spn-secrets-connect-azure-databricks-to-adls-gen2/m-p/78692#M3409</guid>
      <dc:creator>iakshaykr</dc:creator>
      <dc:date>2024-07-14T12:56:32Z</dc:date>
    </item>
  </channel>
</rss>

