<?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 Extending DevOps Service Principal support? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4881#M1469</link>
    <description>&lt;P&gt;As per the previous discussion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.databricks.com/s/question/0D53f00001SHVLuCAP/how-to-use-databricks-repos-with-a-service-principal-for-cicd-in-azure-devops" alt="https://community.databricks.com/s/question/0D53f00001SHVLuCAP/how-to-use-databricks-repos-with-a-service-principal-for-cicd-in-azure-devops" target="_blank"&gt;How to use Databricks Repos with a service principal for CI/CD in Azure DevOps?&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The recommendation was to create a DevOps PAT for the Service Principal and upload it to Databricks using the Git Credential API. The main flaw with this approach being that PATs must be rotated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The DevOps team recently announced availability of a new capability: "Service principals and managed identities provide an exciting new alternative to personal access tokens"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://devblogs.microsoft.com/devops/introducing-service-principal-and-managed-identity-support-on-azure-devops/" target="test_blank"&gt;https://devblogs.microsoft.com/devops/introducing-service-principal-and-managed-identity-support-on-azure-devops/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will Databricks support this feature? At the moment, if I run a workflow job with a Service Principal which has access to the DevOps repo I get this error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="AAD auth error"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/249iFD6D15A6988E5CBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="AAD auth error" alt="AAD auth error" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2023 00:03:50 GMT</pubDate>
    <dc:creator>krucial_koala</dc:creator>
    <dc:date>2023-05-03T00:03:50Z</dc:date>
    <item>
      <title>Extending DevOps Service Principal support?</title>
      <link>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4881#M1469</link>
      <description>&lt;P&gt;As per the previous discussion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.databricks.com/s/question/0D53f00001SHVLuCAP/how-to-use-databricks-repos-with-a-service-principal-for-cicd-in-azure-devops" alt="https://community.databricks.com/s/question/0D53f00001SHVLuCAP/how-to-use-databricks-repos-with-a-service-principal-for-cicd-in-azure-devops" target="_blank"&gt;How to use Databricks Repos with a service principal for CI/CD in Azure DevOps?&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The recommendation was to create a DevOps PAT for the Service Principal and upload it to Databricks using the Git Credential API. The main flaw with this approach being that PATs must be rotated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The DevOps team recently announced availability of a new capability: "Service principals and managed identities provide an exciting new alternative to personal access tokens"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://devblogs.microsoft.com/devops/introducing-service-principal-and-managed-identity-support-on-azure-devops/" target="test_blank"&gt;https://devblogs.microsoft.com/devops/introducing-service-principal-and-managed-identity-support-on-azure-devops/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will Databricks support this feature? At the moment, if I run a workflow job with a Service Principal which has access to the DevOps repo I get this error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="AAD auth error"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/249iFD6D15A6988E5CBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="AAD auth error" alt="AAD auth error" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 00:03:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4881#M1469</guid>
      <dc:creator>krucial_koala</dc:creator>
      <dc:date>2023-05-03T00:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Extending DevOps Service Principal support?</title>
      <link>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4883#M1471</link>
      <description>&lt;P&gt;Hi @Debayan Mukherjee​, thanks for getting back to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Microsoft recommend not using PATs where possible as:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;However, using an authentication method tied to a single person also means relying on a single point-of-failure. When a user leaves the company, the PAT driving the team application will become inaccessible to all other team members&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;They also say:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Additionally, PATs are bearer tokens, which can be leaked easily and fall into the wrong hands. ... we welcome you to explore service principals and managed identities instead.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Based on the risks of users leaving, and token leakage, we have a company policy which limits PAT lifetime to 90 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These attributes make it difficult to put a solution into production.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DevOps now supports accessing services without using a PAT, so presumably Databricks could request a bearer token for the Service Principal running the job, from Azure AD?&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 00:24:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4883#M1471</guid>
      <dc:creator>krucial_koala</dc:creator>
      <dc:date>2023-05-08T00:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Extending DevOps Service Principal support?</title>
      <link>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4885#M1473</link>
      <description>&lt;P&gt;Hi @James Baxter​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for posting your question in our community! We are happy to assist you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 07:40:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4885#M1473</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-19T07:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Extending DevOps Service Principal support?</title>
      <link>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4882#M1470</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Git repo PAT can only be generated for an user (as in this guide&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&amp;amp;tabs=Windows" alt="https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&amp;amp;tabs=Windows" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&amp;amp;tabs=Windows&lt;/A&gt;) but not for a service principal.&amp;nbsp;You will need to use some user’s Git PAT (your own PAT in Azure DevOps should work) for the Service Principal when calling the Git Credentials API:&lt;A href="https://stackoverflow.com/questions/72256036/azure-databricks-api-cannot-add-repos-using-service-principal-and-api-calls/72273439#72273439" alt="https://stackoverflow.com/questions/72256036/azure-databricks-api-cannot-add-repos-using-service-principal-and-api-calls/72273439#72273439" target="_blank"&gt;https://stackoverflow.com/questions/72256036/azure-databricks-api-cannot-add-repos-using-service-principal-and-api-calls/72273439#72273439&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please let us know if this helps. Also, please tag&amp;nbsp;&lt;A href="https://community.databricks.com/s/profile/0053f000000WWwvAAG" alt="https://community.databricks.com/s/profile/0053f000000WWwvAAG" target="_blank"&gt;@Debayan&lt;/A&gt;​&amp;nbsp;with your next comment so that I will get notified. Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 06:01:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4882#M1470</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2023-05-06T06:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Extending DevOps Service Principal support?</title>
      <link>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4884#M1472</link>
      <description>&lt;P&gt;Hi, For Azure AD tokens for service principles,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Define a service principal in Azure Active Directory and then get an Azure AD access token for that service principal instead of for a user. You configure the service principal as one on which authentication and authorization policies can be enforced in Azure Databricks. Service principals in an Azure Databricks workspace can have different fine-grained access control than regular users (user principals).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference: &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/" alt="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, to note, As a security best practice, when authenticating with automated tools, systems, scripts, and apps, Databricks recommends you use access tokens belonging to&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/administration-guide/users-groups/service-principals" alt="https://learn.microsoft.com/en-us/azure/databricks/administration-guide/users-groups/service-principals" target="_blank"&gt;service principals&lt;/A&gt;&amp;nbsp;instead of workspace users. To create access tokens for service principals, see&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/administration-guide/users-groups/service-principals#personal-access-tokens" alt="https://learn.microsoft.com/en-us/azure/databricks/administration-guide/users-groups/service-principals#personal-access-tokens" target="_blank"&gt;Manage access tokens for a service principal&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For managing PATs, you can refer: &lt;A href="https://learn.microsoft.com/en-gb/azure/databricks/administration-guide/access-control/tokens" alt="https://learn.microsoft.com/en-gb/azure/databricks/administration-guide/access-control/tokens" target="_blank"&gt;https://learn.microsoft.com/en-gb/azure/databricks/administration-guide/access-control/tokens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let us know if this helps. Also, please tag&amp;nbsp;&lt;A href="https://community.databricks.com/s/profile/0053f000000WWwvAAG" alt="https://community.databricks.com/s/profile/0053f000000WWwvAAG" target="_blank"&gt;@Debayan&lt;/A&gt;​&amp;nbsp;with your next comment so that I will get notified. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 04:43:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/4884#M1472</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2023-05-11T04:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extending DevOps Service Principal support?</title>
      <link>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/36857#M26204</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/26078"&gt;@Debayan&lt;/a&gt; . After searching a lot I finally stumbled upon your response, however I still have some questions. I am trying to install a package (Flask==2.0.2) from my Azure Devops portal using Databricks. For this purpose I am using a PAT and passing this in the %pip install statement in databricks. Now I have created a Service principal and used the same in my `Service Connections` in Azure Devops, but while using this, I am not able to run my pip install. I have scoured the net for a possible solution. Can you please help.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 15:34:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/extending-devops-service-principal-support/m-p/36857#M26204</guid>
      <dc:creator>cKunal</dc:creator>
      <dc:date>2023-07-03T15:34:12Z</dc:date>
    </item>
  </channel>
</rss>

