<?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 Running terraform plan; databricks throws a &amp;quot;Permission_Denied: Missing required permissions [View] on node with ID &amp;quot;1759335429158542&amp;quot; in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/running-terraform-plan-databricks-throws-a-quot-permission/m-p/8965#M4471</link>
    <description>&lt;P&gt;To give you a little bit of background:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We use terraform to deploy a resource group with multiple Azure services &lt;/LI&gt;&lt;LI&gt;Terraform leverages an Azure Service Principal that has Owner rights to the Azure subscription&lt;/LI&gt;&lt;LI&gt;This way, databricks is also deployed. We also define the github repo configuration within terraform, and pass in the Github username and PAT (with necessary permissions)  &lt;/LI&gt;&lt;LI&gt;A week ago, when trying to add definitions to terraform (non-databricks related), we started seeing the following error&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;Error: cannot read repo: PERMISSION_DENIED: Missing required permissions [View] on node with ID '1759335429158542'. Using azure-client-secret auth: host=https://adb-&amp;lt;XYZ&amp;gt;.azuredatabricks.net, azure_client_secret=***REDACTED***, 
azure_client_id=***, azure_tenant_id=***&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;However, when I am unable to locate anything with that ID. I suspect it is one of the repos, but I am simply not able to find it.&lt;/LI&gt;&lt;LI&gt;I've gone ahead and used the Git Credentials API to PATCH/modify the PAT token for our Service Principal&lt;UL&gt;&lt;LI&gt;Basically logged in to Azure using the service principal, generated an access token with the scope of "2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default" &amp;lt;&amp;lt; to my knowledge, this is the  unique ID for databricks&lt;/LI&gt;&lt;LI&gt;Used CURL to GET/PATCH various API&lt;/LI&gt;&lt;LI&gt;Still getting the same error&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of the commands used&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;#Azure login
az login --service-principal -u Env:ARM-CLIENT-ID -p Env:ARM-CLIENT-SECRET --tenant Env:ARM-TENANT-ID
&amp;nbsp;
#Generate token
AZ_TOKEN=$(az account get-access-token --scope "2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default" --tenant Env:ARM-TENANT-ID | jq -r '.accessToken')
&amp;nbsp;
#Updated the Databricks Git Credentials by using GET then PATCH
curl -X GET -H "Authorization: Bearer $DB_TOKEN" \
&lt;A href="https://adb-7866570032917376.16.azuredatabricks.net/api/2.0/git-credentials" target="test_blank"&gt;https://adb-7866570032917376.16.azuredatabricks.net/api/2.0/git-credentials&lt;/A&gt;
&amp;nbsp;
#alternatively also used
curl -X GET/PATCH -H "Authorization: Bearer $DB_TOKEN" \
-H "X-Databricks-Azure-SP-Management-Token: $AZ_TOKEN" \
-H "X-Databricks-Azure-Workspace-Resource-Id: $WS_ID" \
-d '{"personal_access_token": "$PAT", "git_username": "$GITUSER", "git_provider": "gitHub"}' \
&lt;A href="https://$DATABRICKS_URL/api/2.0/git-credentials/" target="test_blank"&gt;https://$DATABRICKS_URL/api/2.0/git-credentials/&lt;/A&gt;
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any thoughts or ideas would be much appreciated.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2023 18:45:53 GMT</pubDate>
    <dc:creator>gentresh</dc:creator>
    <dc:date>2023-02-21T18:45:53Z</dc:date>
    <item>
      <title>Running terraform plan; databricks throws a "Permission_Denied: Missing required permissions [View] on node with ID "1759335429158542"</title>
      <link>https://community.databricks.com/t5/data-engineering/running-terraform-plan-databricks-throws-a-quot-permission/m-p/8965#M4471</link>
      <description>&lt;P&gt;To give you a little bit of background:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We use terraform to deploy a resource group with multiple Azure services &lt;/LI&gt;&lt;LI&gt;Terraform leverages an Azure Service Principal that has Owner rights to the Azure subscription&lt;/LI&gt;&lt;LI&gt;This way, databricks is also deployed. We also define the github repo configuration within terraform, and pass in the Github username and PAT (with necessary permissions)  &lt;/LI&gt;&lt;LI&gt;A week ago, when trying to add definitions to terraform (non-databricks related), we started seeing the following error&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;Error: cannot read repo: PERMISSION_DENIED: Missing required permissions [View] on node with ID '1759335429158542'. Using azure-client-secret auth: host=https://adb-&amp;lt;XYZ&amp;gt;.azuredatabricks.net, azure_client_secret=***REDACTED***, 
azure_client_id=***, azure_tenant_id=***&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;However, when I am unable to locate anything with that ID. I suspect it is one of the repos, but I am simply not able to find it.&lt;/LI&gt;&lt;LI&gt;I've gone ahead and used the Git Credentials API to PATCH/modify the PAT token for our Service Principal&lt;UL&gt;&lt;LI&gt;Basically logged in to Azure using the service principal, generated an access token with the scope of "2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default" &amp;lt;&amp;lt; to my knowledge, this is the  unique ID for databricks&lt;/LI&gt;&lt;LI&gt;Used CURL to GET/PATCH various API&lt;/LI&gt;&lt;LI&gt;Still getting the same error&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of the commands used&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;#Azure login
az login --service-principal -u Env:ARM-CLIENT-ID -p Env:ARM-CLIENT-SECRET --tenant Env:ARM-TENANT-ID
&amp;nbsp;
#Generate token
AZ_TOKEN=$(az account get-access-token --scope "2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default" --tenant Env:ARM-TENANT-ID | jq -r '.accessToken')
&amp;nbsp;
#Updated the Databricks Git Credentials by using GET then PATCH
curl -X GET -H "Authorization: Bearer $DB_TOKEN" \
&lt;A href="https://adb-7866570032917376.16.azuredatabricks.net/api/2.0/git-credentials" target="test_blank"&gt;https://adb-7866570032917376.16.azuredatabricks.net/api/2.0/git-credentials&lt;/A&gt;
&amp;nbsp;
#alternatively also used
curl -X GET/PATCH -H "Authorization: Bearer $DB_TOKEN" \
-H "X-Databricks-Azure-SP-Management-Token: $AZ_TOKEN" \
-H "X-Databricks-Azure-Workspace-Resource-Id: $WS_ID" \
-d '{"personal_access_token": "$PAT", "git_username": "$GITUSER", "git_provider": "gitHub"}' \
&lt;A href="https://$DATABRICKS_URL/api/2.0/git-credentials/" target="test_blank"&gt;https://$DATABRICKS_URL/api/2.0/git-credentials/&lt;/A&gt;
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any thoughts or ideas would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 18:45:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/running-terraform-plan-databricks-throws-a-quot-permission/m-p/8965#M4471</guid>
      <dc:creator>gentresh</dc:creator>
      <dc:date>2023-02-21T18:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Running terraform plan; databricks throws a "Permission_Denied: Missing required permissions [View] on node with ID "1759335429158542"</title>
      <link>https://community.databricks.com/t5/data-engineering/running-terraform-plan-databricks-throws-a-quot-permission/m-p/8967#M4473</link>
      <description>&lt;P&gt;Hi @Gent Reshtani​&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>Sat, 22 Apr 2023 06:37:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/running-terraform-plan-databricks-throws-a-quot-permission/m-p/8967#M4473</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-22T06:37:58Z</dc:date>
    </item>
  </channel>
</rss>

