<?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 I use databricks principals on databricks connect 12.2? in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/can-i-use-databricks-principals-on-databricks-connect-12-2/m-p/60397#M2571</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;&lt;/P&gt;&lt;P&gt;Thanks for your response. I was able to generate the token of the service principal following &lt;A href="https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html#manually-generate-a-workspace-level-access-token" target="_self"&gt;this doc,&lt;/A&gt;&amp;nbsp;later saved it in the &amp;lt;Databricks Token&amp;gt; variable prompted when running databricks-connect configure command in terminal. And was able to run the pyspark code as expected.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But as I see read through the docs, the databricks principals token expires in 1 hr. I have few doubts:&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is there a way to increase the expiration time of the token?&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Where is this export variable (i.e&amp;nbsp;Databricks Token) or other databricks-connect variables (like&amp;nbsp;Databricks Host, Cluster ID, Org ID) stored in environment?&lt;BR /&gt;As I was trying to build a script which hits the service principals APIs to get the token and later exports the token value in databricks-connect configure command (doing something similar &lt;A href="https://stackoverflow.com/questions/8365394/set-environment-variable-in-python-script" target="_self"&gt;given in this link,&lt;/A&gt;&amp;nbsp;so that I won't have to keep generating a new token everytime)&lt;BR /&gt;I tried finding the variables using: &amp;lt;grep -iR "Databricks Token"&amp;gt; and other commands, but didn't get any useful results.&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Fri, 16 Feb 2024 11:21:42 GMT</pubDate>
    <dc:creator>Surajv</dc:creator>
    <dc:date>2024-02-16T11:21:42Z</dc:date>
    <item>
      <title>Can I use databricks principals on databricks connect 12.2?</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-i-use-databricks-principals-on-databricks-connect-12-2/m-p/60361#M2568</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;Is it possible to use Databricks service principals for authentication on Databricks connect 12.2 to connect my notebook or code to Databricks compute, rather than using personal access token?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked the docs and got to know that upgrading Databricks version to v13+ gives us access to using Databricks service principals in Databricks connect, but that also requires setting up Unity catalogue.&lt;/P&gt;&lt;P&gt;As per our current use case, we are restricting to using Databricks connect 12.2 only (unless no other way out) but that is limiting the authentication features.&lt;/P&gt;&lt;P&gt;Hence wanted to ask, if there's a way out or any piece of document which shows a way to use service principals in Databricks connect 12.2?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 08:32:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-i-use-databricks-principals-on-databricks-connect-12-2/m-p/60361#M2568</guid>
      <dc:creator>Surajv</dc:creator>
      <dc:date>2024-02-16T08:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use databricks principals on databricks connect 12.2?</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-i-use-databricks-principals-on-databricks-connect-12-2/m-p/60397#M2571</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;&lt;/P&gt;&lt;P&gt;Thanks for your response. I was able to generate the token of the service principal following &lt;A href="https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html#manually-generate-a-workspace-level-access-token" target="_self"&gt;this doc,&lt;/A&gt;&amp;nbsp;later saved it in the &amp;lt;Databricks Token&amp;gt; variable prompted when running databricks-connect configure command in terminal. And was able to run the pyspark code as expected.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But as I see read through the docs, the databricks principals token expires in 1 hr. I have few doubts:&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is there a way to increase the expiration time of the token?&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Where is this export variable (i.e&amp;nbsp;Databricks Token) or other databricks-connect variables (like&amp;nbsp;Databricks Host, Cluster ID, Org ID) stored in environment?&lt;BR /&gt;As I was trying to build a script which hits the service principals APIs to get the token and later exports the token value in databricks-connect configure command (doing something similar &lt;A href="https://stackoverflow.com/questions/8365394/set-environment-variable-in-python-script" target="_self"&gt;given in this link,&lt;/A&gt;&amp;nbsp;so that I won't have to keep generating a new token everytime)&lt;BR /&gt;I tried finding the variables using: &amp;lt;grep -iR "Databricks Token"&amp;gt; and other commands, but didn't get any useful results.&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 16 Feb 2024 11:21:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-i-use-databricks-principals-on-databricks-connect-12-2/m-p/60397#M2571</guid>
      <dc:creator>Surajv</dc:creator>
      <dc:date>2024-02-16T11:21:42Z</dc:date>
    </item>
  </channel>
</rss>

