<?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: How can we customize the access token expiry duration? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-can-we-customize-the-access-token-expiry-duration/m-p/101065#M40525</link>
    <description>&lt;P&gt;I would say that your token should be manually refreshed as mentioned in the following statement in docs:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Databricks tools and SDKs that implement the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="reference internal" href="https://docs.databricks.com/en/dev-tools/auth/unified-auth.html" target="_blank"&gt;&lt;SPAN class="doc"&gt;Databricks client unified authentication&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;standard will automatically generate, refresh, and use Databricks OAuth access tokens on your behalf as needed for OAuth M2M authentication.&lt;/P&gt;
&lt;P&gt;Databricks recommends using client unified authentication, however if you must manually generate, refresh, or use Databricks OAuth access tokens, follow the instructions in this section.&lt;BR /&gt;&lt;BR /&gt;As on the connection string you are not being requested to generate the token this should means it is done on behalf.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2024 12:20:00 GMT</pubDate>
    <dc:creator>Walter_C</dc:creator>
    <dc:date>2024-12-05T12:20:00Z</dc:date>
    <item>
      <title>How can we customize the access token expiry duration?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-customize-the-access-token-expiry-duration/m-p/101050#M40523</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using OAuth machine-to-machine (M2M) authentication. I created a service principal and wrote a Java application that allows me to connect to the Databricks warehouse. My question is regarding the code below:&lt;/P&gt;&lt;P&gt;String url = "jdbc:databricks://&amp;lt;server-hostname&amp;gt;:443";&lt;BR /&gt;Properties p = new java.util.Properties();&lt;BR /&gt;p.put("httpPath", "&amp;lt;http-path&amp;gt;");&lt;BR /&gt;p.put("AuthMech", "11");&lt;BR /&gt;p.put("Auth_Flow", "1");&lt;BR /&gt;p.put("OAuth2ClientId", "&amp;lt;service-principal-application-id&amp;gt;");&lt;BR /&gt;p.put("OAuth2Secret", "&amp;lt;service-principal-oauth-secret&amp;gt;");&lt;BR /&gt;Connection conn = DriverManager.getConnection(url, p);&lt;/P&gt;&lt;P&gt;I only provide the client ID and secret, and the rest is handled by the driver, such as generating the access token internally. According to the documentation, the access token expires after 1 hour. If my application runs continuously for more than 1 hour, will the driver automatically handle token refresh once the current token expires? Alternatively, is there a way to customize the access token expiration duration when creating the service principal?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 09:34:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-customize-the-access-token-expiry-duration/m-p/101050#M40523</guid>
      <dc:creator>Balram-snaplogi</dc:creator>
      <dc:date>2024-12-05T09:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can we customize the access token expiry duration?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-customize-the-access-token-expiry-duration/m-p/101065#M40525</link>
      <description>&lt;P&gt;I would say that your token should be manually refreshed as mentioned in the following statement in docs:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Databricks tools and SDKs that implement the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="reference internal" href="https://docs.databricks.com/en/dev-tools/auth/unified-auth.html" target="_blank"&gt;&lt;SPAN class="doc"&gt;Databricks client unified authentication&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;standard will automatically generate, refresh, and use Databricks OAuth access tokens on your behalf as needed for OAuth M2M authentication.&lt;/P&gt;
&lt;P&gt;Databricks recommends using client unified authentication, however if you must manually generate, refresh, or use Databricks OAuth access tokens, follow the instructions in this section.&lt;BR /&gt;&lt;BR /&gt;As on the connection string you are not being requested to generate the token this should means it is done on behalf.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 12:20:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-customize-the-access-token-expiry-duration/m-p/101065#M40525</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-12-05T12:20:00Z</dc:date>
    </item>
  </channel>
</rss>

