<?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: Generating Personal Access Token to service principle databricks cli in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/75501#M34970</link>
    <description>&lt;P&gt;Hi Walter,&lt;/P&gt;&lt;P&gt;Thanks for the reply. I have not tried your method but will accept as an alternative solution. What end up working for me was to to a machine-to-machine authentication with the service principal and generating a token from the&lt;/P&gt;&lt;P&gt;authenticated used.&lt;/P&gt;&lt;P&gt;Had to have the profile configured as&amp;nbsp;&lt;/P&gt;&lt;P&gt;[your-sp-profile-name]&lt;BR /&gt;host = https://&amp;lt;host&amp;gt;.azuredatabricks.net&lt;BR /&gt;client_id = &amp;lt;appId&amp;gt;&lt;BR /&gt;client_secret = &amp;lt;service principle Oauth Token&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Then to generate a pat just do&amp;nbsp;&lt;/P&gt;&lt;P&gt;databricks tokens create --comment dab -p your-sp-profile-name&lt;/P&gt;&lt;P&gt;Docs for azure is &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/oauth-m2m#profile" target="_self"&gt;here&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Jun 2024 10:49:35 GMT</pubDate>
    <dc:creator>pedrojunqueira</dc:creator>
    <dc:date>2024-06-23T10:49:35Z</dc:date>
    <item>
      <title>Generating Personal Access Token to service principle databricks cli</title>
      <link>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/74907#M34812</link>
      <description>&lt;P&gt;Hi I am having issues generating personal access token to my service principle.&lt;/P&gt;&lt;P&gt;I followed the steps from &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/cli/authentication#--microsoft-entra-id-service-principal-authentication" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my `~/.databrickscfg` has the following&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;[my-profile-name]&lt;BR /&gt;host = &amp;lt;account-console-url&amp;gt;&lt;BR /&gt;account_id = &amp;lt;account-id&amp;gt;&lt;BR /&gt;azure_tenant_id = &amp;lt;azure-service-principal-tenant-id&amp;gt;&lt;BR /&gt;azure_client_id = &amp;lt;azure-service-principal-application-id&amp;gt;&lt;BR /&gt;azure_client_secret = &amp;lt;azure-service-principal-client-secret&amp;gt;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;then if I do the &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/admin/users-groups/service-principals#manage-personal-access-tokens-for-a-service-principal" target="_self"&gt;command&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;`databricks tokens create --comment &amp;lt;comment&amp;gt; --lifetime-seconds &amp;lt;lifetime-seconds&amp;gt; -p my-profile-name&lt;SPAN&gt;`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;it DOES generates a token BUT to my user authenticated (my email)&lt;/P&gt;&lt;P&gt;then I try to do any other command to deploy dabs (Databricks Asset Bundle) and it always default to my authenticated user.&lt;/P&gt;&lt;P&gt;like if I do a [EDITED]&lt;/P&gt;&lt;P&gt;`databricks bundle deploy --profile my-profile-name`&lt;/P&gt;&lt;P&gt;then it deploys to my user not what I specified in the profile...&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;Name: python_package&lt;BR /&gt;Target: dev&lt;BR /&gt;Workspace:&lt;BR /&gt;Host: &lt;A href="https://adb-1666302976490045.5.azuredatabricks.net" target="_blank" rel="noopener"&gt;https://adb-1666302976490045.5.azuredatabricks.net&lt;/A&gt;&lt;BR /&gt;User: pedrocj@gmail.com&lt;BR /&gt;Path: /Users/pedrocj@gmail.com/.bundle/python_package/dev&lt;/P&gt;&lt;P&gt;Validation OK!&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;I would expect to validate or deploy to my service principle that is defined in the&amp;nbsp;`~/.databrickscfg`&lt;/P&gt;&lt;P&gt;I added the service principle to be a workspace adm and give all the associated permissions in the the account console.&lt;/P&gt;&lt;P&gt;what I am doing wrong?&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Pedro&lt;/P&gt;&lt;P&gt;PS: I did it couple of days ago and all works like a charm. But now It is not working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 21:35:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/74907#M34812</guid>
      <dc:creator>pedrojunqueira</dc:creator>
      <dc:date>2024-06-18T21:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Personal Access Token to service principle databricks cli</title>
      <link>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/75035#M34850</link>
      <description>&lt;P&gt;Hello Pedro, you can create tokens on behalf service principal by running command on CLI:&lt;BR /&gt;&lt;BR /&gt;databricks token-management create-obo-token &amp;lt;application-id&amp;gt; --lifetime-seconds &amp;lt;lifetime-seconds&amp;gt; --comment &amp;lt;comment&amp;gt; -p &amp;lt;profile-name&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Or by API call&amp;nbsp;&lt;A href="https://docs.databricks.com/api/workspace/tokenmanagement/createobotoken" target="_blank"&gt;https://docs.databricks.com/api/workspace/tokenmanagement/createobotoken&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The command you are running is only set for user PAT token, this is why it authenticates with your user.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 18:05:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/75035#M34850</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-06-19T18:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Personal Access Token to service principle databricks cli</title>
      <link>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/75501#M34970</link>
      <description>&lt;P&gt;Hi Walter,&lt;/P&gt;&lt;P&gt;Thanks for the reply. I have not tried your method but will accept as an alternative solution. What end up working for me was to to a machine-to-machine authentication with the service principal and generating a token from the&lt;/P&gt;&lt;P&gt;authenticated used.&lt;/P&gt;&lt;P&gt;Had to have the profile configured as&amp;nbsp;&lt;/P&gt;&lt;P&gt;[your-sp-profile-name]&lt;BR /&gt;host = https://&amp;lt;host&amp;gt;.azuredatabricks.net&lt;BR /&gt;client_id = &amp;lt;appId&amp;gt;&lt;BR /&gt;client_secret = &amp;lt;service principle Oauth Token&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Then to generate a pat just do&amp;nbsp;&lt;/P&gt;&lt;P&gt;databricks tokens create --comment dab -p your-sp-profile-name&lt;/P&gt;&lt;P&gt;Docs for azure is &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/oauth-m2m#profile" target="_self"&gt;here&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2024 10:49:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/75501#M34970</guid>
      <dc:creator>pedrojunqueira</dc:creator>
      <dc:date>2024-06-23T10:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Personal Access Token to service principle databricks cli</title>
      <link>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/91630#M38224</link>
      <description>&lt;P&gt;I want something similar, to use a service principal token instead of a PAT, have you ever done this?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.databricks.com/t5/administration-architecture/use-a-service-principal-token-instead-of-personal-access-token/m-p/91629" target="_blank"&gt;https://community.databricks.com/t5/administration-architecture/use-a-service-principal-token-instead-of-personal-access-token/m-p/91629&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 21:13:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/91630#M38224</guid>
      <dc:creator>PabloCSD</dc:creator>
      <dc:date>2024-09-24T21:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Personal Access Token to service principle databricks cli</title>
      <link>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/91644#M38227</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/106298"&gt;@PabloCSD&lt;/a&gt;&amp;nbsp;I will reply in your original &lt;A href="https://community.databricks.com/t5/administration-architecture/use-a-service-principal-token-instead-of-personal-access-token/m-p/91629" target="_self"&gt;post&lt;/A&gt; about how you may be able to resolve this issue.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pedro&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 03:59:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/91644#M38227</guid>
      <dc:creator>dataeng42io</dc:creator>
      <dc:date>2024-09-25T03:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Personal Access Token to service principle databricks cli</title>
      <link>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/114392#M44802</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Attention&lt;/STRONG&gt;: It only works in AWS and GCP but don't work in Azure.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 11:24:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/generating-personal-access-token-to-service-principle-databricks/m-p/114392#M44802</guid>
      <dc:creator>sutariya_98</dc:creator>
      <dc:date>2025-04-03T11:24:27Z</dc:date>
    </item>
  </channel>
</rss>

