<?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 Error: cannot create job: 'SERVICE_PRINCIPAL_NAME' cannot be set as run_as_username in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/error-cannot-create-job-service-principal-name-cannot-be-set-as/m-p/78805#M35603</link>
    <description>&lt;P&gt;Hi Team,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am trying to deploy workflows to Databricks Workspace via Databricks Asset Bundle (DAB) using Azure Service Principle. Below is my databricks.yml file which i am using for DAB.&lt;BR /&gt;I am replacing the "&lt;SPAN&gt;SERVICE_PRINCIPAL_NAME" variable in my Jenkins pipeline before running the data bricks cli commands.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;bundle:
  name: test
  version: 0.0.1
  terraform:
    exec_path: '/opt/tf_binaries/terraform'

include:
  - resources/*.yml

targets:
  # The 'dev' target, for development purposes. This target is the default.
  dev:
    mode: production
    default: true
    workspace:
      host: https://adb-xxxxx.azuredatabricks.net
      root_path: Workspace/
      artifact_path: /Workspace/artifacts
      file_path: Workspace/
      state_path: /Workspace/state
    run_as:
      service_principal_name: SERVICE_PRINCIPAL_NAME

 
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using below commands:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;databricks bundle validate -t dev -p DEFAULT &amp;amp; databricks bundle deploy -t dev -p DEFAULT&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to validate the bundle successfully but when trying to deploy getting the below error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Error: cannot create job: 'SERVICE_PRINCIPAL_NAME' cannot be set as run_as_username, either because the user does not exist or is not a service principal.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If, i dont deploy the workflow files (.yml files under resources folder) i am able to deploy successfully without any issue.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Kindly suggest on how to deploy the workflow with service_principle.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2024 13:47:19 GMT</pubDate>
    <dc:creator>Nisharunnisa</dc:creator>
    <dc:date>2024-07-15T13:47:19Z</dc:date>
    <item>
      <title>Error: cannot create job: 'SERVICE_PRINCIPAL_NAME' cannot be set as run_as_username</title>
      <link>https://community.databricks.com/t5/data-engineering/error-cannot-create-job-service-principal-name-cannot-be-set-as/m-p/78805#M35603</link>
      <description>&lt;P&gt;Hi Team,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am trying to deploy workflows to Databricks Workspace via Databricks Asset Bundle (DAB) using Azure Service Principle. Below is my databricks.yml file which i am using for DAB.&lt;BR /&gt;I am replacing the "&lt;SPAN&gt;SERVICE_PRINCIPAL_NAME" variable in my Jenkins pipeline before running the data bricks cli commands.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;bundle:
  name: test
  version: 0.0.1
  terraform:
    exec_path: '/opt/tf_binaries/terraform'

include:
  - resources/*.yml

targets:
  # The 'dev' target, for development purposes. This target is the default.
  dev:
    mode: production
    default: true
    workspace:
      host: https://adb-xxxxx.azuredatabricks.net
      root_path: Workspace/
      artifact_path: /Workspace/artifacts
      file_path: Workspace/
      state_path: /Workspace/state
    run_as:
      service_principal_name: SERVICE_PRINCIPAL_NAME

 
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using below commands:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;databricks bundle validate -t dev -p DEFAULT &amp;amp; databricks bundle deploy -t dev -p DEFAULT&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to validate the bundle successfully but when trying to deploy getting the below error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Error: cannot create job: 'SERVICE_PRINCIPAL_NAME' cannot be set as run_as_username, either because the user does not exist or is not a service principal.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If, i dont deploy the workflow files (.yml files under resources folder) i am able to deploy successfully without any issue.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Kindly suggest on how to deploy the workflow with service_principle.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 13:47:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-cannot-create-job-service-principal-name-cannot-be-set-as/m-p/78805#M35603</guid>
      <dc:creator>Nisharunnisa</dc:creator>
      <dc:date>2024-07-15T13:47:19Z</dc:date>
    </item>
  </channel>
</rss>

