<?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: run datarbicks worflow as service pricipal (managed identity) reads from azure dev ops repo Fail in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/75925#M7592</link>
    <description>&lt;P&gt;We managed to solve this problem, however it is not an elegant solution. Databricks should simplify this.&lt;/P&gt;&lt;P&gt;The steps that have to be done are listed below. We are using user assigned managed identity (MI), but I assume this should work for Azure Service Principals as well.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 1 - Create a PAT&lt;/STRONG&gt;&lt;FONT size="5"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Create a PAT in Azure DevOps with scope Code (Read). This is done with &lt;U&gt;your own account in Azure DevOps&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 2 - Generate Databricks Entra ID access token for the MI&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note: This requires you to have attached the MI to a VM or VMSS, to connect to a bash terminal as the MI.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To get the access token, run the following command:&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;az account get-access-token --resource 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d​&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Note: that the resource ID 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d corresponds to Azure Databricks programmatic ID [1].&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;STRONG&gt;Step 3 - Create Databricks Git credentials for the MI&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use the REST API documentation for creating the Databricks Git credentials [2].&lt;/P&gt;&lt;P&gt;Use the generated access token as "Authorization: Bearer token". For the body use the PAT you created and your Azure DevOps username (your email):&lt;/P&gt;&lt;P&gt;{ "personal_access_token": "&amp;lt;paste-devops-PAT-here&amp;gt;", "git_username": "&amp;lt;paste-your-devops-username&amp;gt;", "git_provider": "azureDevOpsServices" }&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1] &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/service-prin-aad-token#--get-a-microsoft-entra-id-access-token-with-the-microsoft-identity-platform-rest-api" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/azure/databricks/dev-tools/service-prin-aad-token#--get-a-microsoft-entra-id-access-token-with-the-microsoft-identity-platform-rest-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;[2] &lt;A href="https://docs.databricks.com/api/azure/workspace/gitcredentials/create" target="_self"&gt;https://docs.databricks.com/api/azure/workspace/gitcredentials/create&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 27 Jun 2024 08:43:55 GMT</pubDate>
    <dc:creator>IvanK</dc:creator>
    <dc:date>2024-06-27T08:43:55Z</dc:date>
    <item>
      <title>run datarbicks worflow as service pricipal (managed identity) reads from azure dev ops repo Failed</title>
      <link>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/57360#M7588</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;we are running a workflow as a service principal, that is a aad managed identity. This does result in the issue:&amp;nbsp;&lt;STRONG&gt;run databricks workflow as service principal the reads from azure dev ops repo Failed to checkout Git repository:&lt;/STRONG&gt; &lt;STRONG&gt;PERMISSION_DENIED: Encountered an error with your Azure Active Directory credentials. Please try logging out of Azure Active Directory (Azure Portal)&amp;nbsp;and logging back in.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;If I run the workflow as my own user role it works. The Managed Identity is set as a Contributor in the AzureDevOps repository and has the same rights, as my own user has. The only difference is, that it is a aad manged identity and my role is a aad user.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 13:56:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/57360#M7588</guid>
      <dc:creator>jannemanson</dc:creator>
      <dc:date>2024-01-15T13:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: run datarbicks worflow as service pricipal (managed identity) reads from azure dev ops repo Fail</title>
      <link>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/57937#M7589</link>
      <description>&lt;P&gt;Hi, this issue has to be checked from the AAD end. Could you please check the credentials and confirm?&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 06:10:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/57937#M7589</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2024-01-20T06:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: run datarbicks worflow as service pricipal (managed identity) reads from azure dev ops repo Fail</title>
      <link>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/65862#M7590</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/56545"&gt;@jannemanson&lt;/a&gt;Did you manage to solve this issue? If so, how? We are having the same problem&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 08:08:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/65862#M7590</guid>
      <dc:creator>IvanK</dc:creator>
      <dc:date>2024-04-09T08:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: run datarbicks worflow as service pricipal (managed identity) reads from azure dev ops repo Fail</title>
      <link>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/68780#M7591</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/26078"&gt;@Debayan&lt;/a&gt;&amp;nbsp;I'm having the same issue.&amp;nbsp; I'm trying to run a Databricks workflow using an Azure service principal (not a Databricks service principal).&amp;nbsp; The Azure service principal shows up in Databricks (via SCIM provisioning) as a "user" in Databricks.&lt;/P&gt;&lt;P&gt;The documentation from Azure on allowing the Azure service principal to clone a git repo is confusing, especially in light of how the git settings in the task of the Databricks workflow are set up.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried initially using a Databricks service principal, for which I could generate a client_id and a client_secret_id.&amp;nbsp; However, of course the Databricks service principal has no access at all to Azure DevOps (git repos).&amp;nbsp; So that didn't work.&lt;/P&gt;&lt;P&gt;It would be great if someone published an example of how to do this.&amp;nbsp; Azure service principal running Databricks workflows that clone Azure DevOps repos to run code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 00:45:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/68780#M7591</guid>
      <dc:creator>m997al</dc:creator>
      <dc:date>2024-05-11T00:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: run datarbicks worflow as service pricipal (managed identity) reads from azure dev ops repo Fail</title>
      <link>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/75925#M7592</link>
      <description>&lt;P&gt;We managed to solve this problem, however it is not an elegant solution. Databricks should simplify this.&lt;/P&gt;&lt;P&gt;The steps that have to be done are listed below. We are using user assigned managed identity (MI), but I assume this should work for Azure Service Principals as well.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 1 - Create a PAT&lt;/STRONG&gt;&lt;FONT size="5"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Create a PAT in Azure DevOps with scope Code (Read). This is done with &lt;U&gt;your own account in Azure DevOps&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 2 - Generate Databricks Entra ID access token for the MI&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note: This requires you to have attached the MI to a VM or VMSS, to connect to a bash terminal as the MI.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To get the access token, run the following command:&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;az account get-access-token --resource 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d​&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Note: that the resource ID 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d corresponds to Azure Databricks programmatic ID [1].&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;STRONG&gt;Step 3 - Create Databricks Git credentials for the MI&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use the REST API documentation for creating the Databricks Git credentials [2].&lt;/P&gt;&lt;P&gt;Use the generated access token as "Authorization: Bearer token". For the body use the PAT you created and your Azure DevOps username (your email):&lt;/P&gt;&lt;P&gt;{ "personal_access_token": "&amp;lt;paste-devops-PAT-here&amp;gt;", "git_username": "&amp;lt;paste-your-devops-username&amp;gt;", "git_provider": "azureDevOpsServices" }&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1] &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/service-prin-aad-token#--get-a-microsoft-entra-id-access-token-with-the-microsoft-identity-platform-rest-api" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/azure/databricks/dev-tools/service-prin-aad-token#--get-a-microsoft-entra-id-access-token-with-the-microsoft-identity-platform-rest-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;[2] &lt;A href="https://docs.databricks.com/api/azure/workspace/gitcredentials/create" target="_self"&gt;https://docs.databricks.com/api/azure/workspace/gitcredentials/create&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Jun 2024 08:43:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/run-datarbicks-worflow-as-service-pricipal-managed-identity/m-p/75925#M7592</guid>
      <dc:creator>IvanK</dc:creator>
      <dc:date>2024-06-27T08:43:55Z</dc:date>
    </item>
  </channel>
</rss>

