<?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 Accessing TenantId via secret to connect to Azure Data Lake Storage Gen2 doesn't work in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/accessing-tenantid-via-secret-to-connect-to-azure-data-lake/m-p/41128#M777</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm following instructions in this &lt;A href="http://Connect%20to Azure Data Lake Storage Gen2 and Blob Storage" target="_self"&gt;article&lt;/A&gt; to connect to ADLS gen2 using Azure service principal. I can access service principal's app id and secret via Databricks key vault backed secret scope. However, this doesn't work for directory-id and I have to hard code it and then the connection to storage works.&lt;/P&gt;&lt;P&gt;If we were to add this config on the cluster, is there a way to not hard code directory-id?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kalyani&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2023 10:41:50 GMT</pubDate>
    <dc:creator>kp12</dc:creator>
    <dc:date>2023-08-23T10:41:50Z</dc:date>
    <item>
      <title>Accessing TenantId via secret to connect to Azure Data Lake Storage Gen2 doesn't work</title>
      <link>https://community.databricks.com/t5/get-started-discussions/accessing-tenantid-via-secret-to-connect-to-azure-data-lake/m-p/41128#M777</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm following instructions in this &lt;A href="http://Connect%20to Azure Data Lake Storage Gen2 and Blob Storage" target="_self"&gt;article&lt;/A&gt; to connect to ADLS gen2 using Azure service principal. I can access service principal's app id and secret via Databricks key vault backed secret scope. However, this doesn't work for directory-id and I have to hard code it and then the connection to storage works.&lt;/P&gt;&lt;P&gt;If we were to add this config on the cluster, is there a way to not hard code directory-id?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kalyani&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 10:41:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/accessing-tenantid-via-secret-to-connect-to-azure-data-lake/m-p/41128#M777</guid>
      <dc:creator>kp12</dc:creator>
      <dc:date>2023-08-23T10:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing TenantId via secret to connect to Azure Data Lake Storage Gen2 doesn't work</title>
      <link>https://community.databricks.com/t5/get-started-discussions/accessing-tenantid-via-secret-to-connect-to-azure-data-lake/m-p/41172#M783</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;, Thanks for the prompt reply. As per the document, the syntax is the text highlighted in red below for accessing keys from secret scope in spark config. I used the same for app id too and that works. But I if use the same syntax for tenant id i.e., directory-id, it doesn't work.&amp;nbsp;Hardcoding directory-id works.&lt;/P&gt;&lt;P&gt;I'm hardcoding storage account name too. Haven't tested accessing it via secret scope.&lt;/P&gt;&lt;P&gt;I'm adding this config on the cluster, so would&amp;nbsp;&lt;SPAN&gt;dbutils.secrets.get work in spark config?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;fs.azure.account.auth.type.&amp;lt;storage-account&amp;gt;.dfs.core.windows.net OAuth&lt;BR /&gt;fs.azure.account.oauth.provider.type.&amp;lt;storage-account&amp;gt;.dfs.core.windows.net org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider&lt;BR /&gt;fs.azure.account.oauth2.client.id.&amp;lt;storage-account&amp;gt;.dfs.core.windows.net &amp;lt;application-id&amp;gt;&lt;BR /&gt;fs.azure.account.oauth2.client.secret.&amp;lt;storage-account&amp;gt;.dfs.core.windows.net &lt;FONT color="#FF0000"&gt;{{secrets/&amp;lt;secret-scope&amp;gt;/&amp;lt;service-credential-key&amp;gt;}}&lt;/FONT&gt;&lt;BR /&gt;fs.azure.account.oauth2.client.endpoint.&amp;lt;storage-account&amp;gt;.dfs.core.windows.net &lt;A href="https://login.microsoftonline.com/" target="_blank"&gt;https://login.microsoftonline.com/&lt;/A&gt;&amp;lt;directory-id&amp;gt;/oauth2/token&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 13:58:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/accessing-tenantid-via-secret-to-connect-to-azure-data-lake/m-p/41172#M783</guid>
      <dc:creator>kp12</dc:creator>
      <dc:date>2023-08-23T13:58:34Z</dc:date>
    </item>
  </channel>
</rss>

