<?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: Service Principal access notebooks created under /Workspace/Users in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/152177#M53780</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/147238"&gt;@DineshOjha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Given your constraints (per‑application service principals, isolation at the volume/schema level, and not wanting to use /Workspace/Shared), the flow you described&amp;nbsp;aligns with how Bundles are meant to be used in&amp;nbsp;production. Bundles are the recommended CI/CD mechanism, and using service principals as run identities in non‑dev targets is explicitly encouraged.&lt;/P&gt;
&lt;P class="wnfdntd"&gt;A couple of clarifications and direct answers to your questions:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1. Do you think this is a good approach for notebook based implementation or do you suggest anything else?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes, this is a solid pattern for notebook‑based implementations...&amp;nbsp;&lt;SPAN&gt;Git serves as the source of truth, with personal workspaces intended solely for development purposes. Bundles are responsible for deploying notebooks and job definitions into the workspace. In non-development targets, the run_as parameter is configured to use the per-application service principal, ensuring that all production runs utilise that principal’s permissions. This setup includes access to the appropriate volume/schema, which is critical for maintaining consistency and security throughout the deployment process.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The only design choice you still need is where in the workspace Bundles deploy to. You don’t have to use /Workspace/Shared. You can pick any isolated path, for example&amp;nbsp;&lt;SPAN&gt;/Workspace/.bundle/prod/${bundle.name} or&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;/Workspace/Projects/&amp;amp;lt;app_name&amp;amp;gt;/... and&amp;nbsp;&lt;/SPAN&gt;lock that path down so only t&lt;SPAN&gt;he &lt;/SPAN&gt;&lt;SPAN&gt;application service principal&lt;/SPAN&gt;&lt;SPAN&gt;, a&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;small operator group, and o&lt;/SPAN&gt;&lt;SPAN&gt;ptionally CI/CD deployer principals&amp;nbsp;&lt;/SPAN&gt;have access. The path naming is up to you. Bundles just need a root_path per target, and you control the permissions there.&lt;/P&gt;
&lt;P&gt;So I would keep your 4‑step approach and add a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;per‑app workspace root&lt;/SPAN&gt;&lt;SPAN&gt; (instead of &lt;/SPAN&gt;&lt;SPAN&gt;/Shared&lt;/SPAN&gt;&lt;SPAN&gt;), with ACLs granting access only to the relevant SP and operators.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2. The service principal exists only in Databricks, so what email and PAT should be provided to enable GIT access?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;With the Bundles‑from‑Azure‑DevOps pattern you described, the important nuance is that your Databricks service principal does not need to talk directly to Git to make this work.&amp;nbsp;In a typical Azure DevOps setup..&amp;nbsp;Azure DevOps pipelines clone the Git repo themselves using the identity configured in DevOps (service connection, PAT, or Microsoft Entra–backed principal).&amp;nbsp;Once the code is on the build agent, the pipeline calls databricks bundle validate/deploy/run using the Databricks service principal to authenticate to Databricks, not to Git.&lt;/P&gt;
&lt;P&gt;In that model, you do not need to configure a Git email/PAT on the Databricks SP at all.&amp;nbsp;Git credentials live entirely in Azure DevOps (for checking out the repo).The Databricks SP is only used for workspace authentication (via OAuth M2M, workload identity federation, or an ARM service connection).&amp;nbsp;You only need Git credentials on the Databricks SP if you also want it to use Git folders / Repos in the workspace, or run Git‑backed jobs directly from Databricks (using Git‑with‑jobs / Git folders).&lt;/P&gt;
&lt;P&gt;In that case, the email/PAT would belong to a non‑human Azure DevOps identity (service principal or technical user) that has access to the repo. You then link those Git credentials to the Databricks SP via the Git integration tab in the workspace.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. How will service principal get access to the Azure GIT repo (ADO repository)?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In a two-layer setup, the first layer involves Azure DevOps and a Git repository. In this configuration, you create a service principal or technical user with at least Basic access and repository permissions in Azure DevOps. This identity is utilised for your pipelines to check out the code, and it is managed within Azure DevOps, not in Databricks.&lt;/P&gt;
&lt;P&gt;The second layer connects Azure DevOps to Databricks through a Databricks service principal. To set this up, you configure an Azure DevOps service connection that authenticates to Databricks using methods such as OAuth M2M, Azure Resource Manager connection, or the recommended workload identity federation (which avoids long-lived secrets). Your pipeline steps will involve commands like `databricks bundle validate -t prod`, `databricks bundle deploy -t prod`, and `databricks bundle run -t prod &amp;lt;job_name&amp;gt;`, with the Databricks CLI already authenticated as the service principal.&lt;/P&gt;
&lt;P&gt;For a Bundles-only flow, the Databricks service principal does not require direct Git access. It simply needs to support CLI/API calls from the pipeline. However, if you want the Databricks service principal to operate on Git folders within the workspace, you must grant the DevOps identity access to the repository (Basic + repo permissions) and link its Git credentials to your Databricks service principal under the settings for Git integration with Azure DevOps (using PAT or Entra-based authentication).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4. Is there any other access that the service principal needs for this approach, for bundles etc ?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;For the exact permission model and how to wire this up, the official docs cover it in more detail..&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://&amp;nbsp;https://learn.microsoft.com/azure/databricks/dev-tools/ci-cd" target="_self"&gt;&lt;STRONG&gt;CI/CD on Azure Databricks (incl. Bundles + service principals)&lt;/STRONG&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://&amp;nbsp;https://learn.microsoft.com/azure/databricks/dev-tools/auth/service-principals" target="_self"&gt;&lt;STRONG&gt;Service principals for CI/CD&lt;/STRONG&gt; (what entitlements/permissions they need)&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://&amp;nbsp;https://learn.microsoft.com/azure/databricks/repos/automate-with-ms-entra" target="_self"&gt;&lt;STRONG&gt;Authorize a Microsoft Entra service principal to access Git folders&lt;/STRONG&gt; &lt;/A&gt;(if you decide the SP should access Git folders directly)&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://&amp;nbsp;https://learn.microsoft.com/azure/databricks/dev-tools/auth/auth-with-azure-devops" target="_self"&gt;&lt;STRONG&gt;Authenticate with Azure DevOps on Azure Databricks&lt;/STRONG&gt;&lt;/A&gt; (how the DevOps pipeline authenticates as the SP)&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://&amp;nbsp;https://docs.databricks.com/dev-tools/bundles/settings#run_as" target="_self"&gt;&lt;STRONG&gt;Bundles &lt;CODE class="p8i6j0f"&gt;run_as&lt;/CODE&gt; configuration&lt;/STRONG&gt; &lt;/A&gt;(how to set the SP as the run identity in targets)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;DIV class="tk0j8o1 _1ibi0s31a _1ibi0s3dn"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 26 Mar 2026 13:55:20 GMT</pubDate>
    <dc:creator>Ashwin_DSA</dc:creator>
    <dc:date>2026-03-26T13:55:20Z</dc:date>
    <item>
      <title>Service Principal access notebooks created under /Workspace/Users</title>
      <link>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/151760#M53704</link>
      <description>&lt;DIV&gt;What permissions does a Service Principal need to run Databricks jobs that reference notebooks created by a user and stored in Git?&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;We are exploring the &lt;STRONG&gt;notebooks‑first development approach&lt;/STRONG&gt; with &lt;STRONG&gt;Databricks Bundles&lt;/STRONG&gt;, and we’ve run into a workspace‑permissions challenge involving Service Principals.&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;Our setup&lt;/STRONG&gt;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Developers create notebooks under their &lt;STRONG&gt;personal workspace paths&lt;/STRONG&gt;:&lt;PRE&gt;/Workspace/Users/&amp;lt;user_email&amp;gt;/project/notebook&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;These notebooks are synced to Git using Databricks Git folders.&lt;/LI&gt;&lt;LI&gt;We want to create &lt;STRONG&gt;Databricks Bundles jobs&lt;/STRONG&gt; that reference these notebooks and&lt;BR /&gt;&lt;STRONG&gt;run them using a Service Principal (SP)&lt;/STRONG&gt; for production automation.&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;&lt;STRONG&gt;The problem&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;A Service Principal &lt;STRONG&gt;cannot access&lt;/STRONG&gt; user workspace paths such as:&lt;/P&gt;&lt;PRE&gt;/Workspace/Users/&amp;lt;user_email&amp;gt;/...&lt;/PRE&gt;&lt;P&gt;We also &lt;STRONG&gt;cannot&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Move the notebook into /Workspace/Shared/...&lt;/LI&gt;&lt;LI&gt;Grant the SP access to individual user workspace directories&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So the SP has no way to read or execute the notebook, and therefore cannot run the job.&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;Our question&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;&lt;STRONG&gt;How should we structure our workspace, Git folders, or permissions so the Service Principal can run Bundle‑based jobs, without granting SP access to personal user directories?&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Mar 2026 22:53:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/151760#M53704</guid>
      <dc:creator>DineshOjha</dc:creator>
      <dc:date>2026-03-23T22:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Service Principal access notebooks created under /Workspace/Users</title>
      <link>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/151878#M53720</link>
      <description>&lt;P class="wnfdntd" data-pm-slice="1 1 []"&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/147238"&gt;@DineshOjha&lt;/a&gt;,&lt;/P&gt;
&lt;P class="wnfdntd"&gt;This is a good question, and researching this helped me learn some best practices along the way. What you’re seeing is actually expected behaviour. Service principals aren’t meant to execute notebooks directly from users’ personal workspace paths. That limitation is by design for security and isolation reasons.&lt;/P&gt;
&lt;P&gt;Given you’re using Databricks Bundles and a notebooks‑first workflow, the recommended pattern is to treat Git as the source of truth.&amp;nbsp;Developers can work on notebooks under their own /Workspace/Users/... paths (or locally) for convenience, then sync them to Git (via Git folders / Repos). Those copies in personal home directories should be considered development artefacts only, not what production jobs execute.&amp;nbsp;In production, jobs should use notebooks deployed from Git into a shared workspace path, or reference&lt;SPAN&gt;&amp;nbsp;Git directly (using jobs with a Git-based notebook source).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Instead of pointing jobs to /Workspace/Users/..., configure your bundle target so that it deploys notebooks into a shared folder where both the service principal has at least read/execute access, and your team can still inspect the deployed artefacts.&lt;/P&gt;
&lt;P class="wnfdntd"&gt;For example, in your bundle:&lt;/P&gt;
&lt;PRE class="_1ibi0s3cl" dir="auto"&gt;&lt;CODE class="language-yaml"&gt;targets:
  prod:
    workspace:
      host: https://&amp;amp;lt;your-workspace-url&amp;amp;gt;
      root_path: /Workspace/Shared/projects/my-project
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When you run databricks bundle deploy (ideally from CI/CD, authenticated as the service principal), the notebooks defined in the bundle are materialised under&amp;nbsp;/Workspace/Shared/projects/my-project/...&amp;nbsp;Your bundle’s jobs should reference those deployed notebook paths, not the originals under /Workspace/Users/....&lt;/P&gt;
&lt;P class="wnfdntd"&gt;On the Databricks side, you’ll typically want&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI class="wnfdntd"&gt;On /Workspace/Shared/projects/my-project -&amp;nbsp;Can Read (or higher) for the service principal, so it can read/execute the notebooks.&lt;/LI&gt;
&lt;LI class="wnfdntd"&gt;On the jobs created by the bundle -&amp;nbsp;Can Manage or Can Run for the service principal, depending on your governance model.&lt;/LI&gt;
&lt;LI class="wnfdntd"&gt;On compute -&amp;nbsp;Permission for the service principal to use the job cluster or shared compute resource configured for the bundle’s jobs.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="wnfdntd"&gt;With this setup d&lt;SPAN&gt;evelopers continue to use their personal workspace areas for development.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Git remains the source of truth. And, t&lt;/SPAN&gt;&lt;SPAN&gt;he service p&lt;/SPAN&gt;rincipal only interacts with the shared, deployed artifacts and never needs access to /Workspace/Users/....&lt;/P&gt;
&lt;P class="wnfdntd"&gt;If you prefer to be fully Git‑centric, you can also configure jobs to pull notebooks directly from Git (e.g. via Repos/git_source) and grant the service principal access to the Git repo, plus job permissions as above. However,&amp;nbsp;the core principle is the same in both approaches...&amp;nbsp;Don’t run production jobs against notebooks in /Workspace/Users/....&amp;nbsp;Use Git as the source of truth, and deploy or reference notebooks from a shared, service‑principal‑readable location.&lt;/P&gt;
&lt;P class="wnfdntd"&gt;Hope that helps clarify the pattern.&lt;/P&gt;
&lt;P class="wnfdntd"&gt;Please let me know if any of the above is unclear.&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2026 17:59:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/151878#M53720</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-03-24T17:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Service Principal access notebooks created under /Workspace/Users</title>
      <link>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/152081#M53753</link>
      <description>&lt;P&gt;Thank you so much for your response.&lt;/P&gt;&lt;P&gt;We dont prefer to keep the notebooks under Shared or run our jobs pointing to the Shared location. We have more than 200 applications and different teams working on them. Each application has a service principal associated with it and only the service principal has access to the specific applications volume and schema.&lt;/P&gt;&lt;P&gt;Based on your response, we are planning to follow the below approach.&lt;/P&gt;&lt;P&gt;1. Create notebooks under personal user account&lt;/P&gt;&lt;P&gt;2. Push the code to GIT&lt;/P&gt;&lt;P&gt;3. Deploy using bundles&lt;/P&gt;&lt;P&gt;4. In the bundles, provide the run_as AS service principal so that the jobs are owned and run using the service principal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;1. Do you think this is a good approach for notebook based implementation or do you suggest anything else?&lt;/P&gt;&lt;P&gt;2. The service principal exists only in Databricks, so what email and PAT should be provided to enable GIT access? 3. How will service principal get access to the Azure GIT repo (ADO repository)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Is there any other access that the service principal needs for this approach, for bundles etc ?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2026 22:53:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/152081#M53753</guid>
      <dc:creator>DineshOjha</dc:creator>
      <dc:date>2026-03-25T22:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Service Principal access notebooks created under /Workspace/Users</title>
      <link>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/152177#M53780</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/147238"&gt;@DineshOjha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Given your constraints (per‑application service principals, isolation at the volume/schema level, and not wanting to use /Workspace/Shared), the flow you described&amp;nbsp;aligns with how Bundles are meant to be used in&amp;nbsp;production. Bundles are the recommended CI/CD mechanism, and using service principals as run identities in non‑dev targets is explicitly encouraged.&lt;/P&gt;
&lt;P class="wnfdntd"&gt;A couple of clarifications and direct answers to your questions:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1. Do you think this is a good approach for notebook based implementation or do you suggest anything else?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes, this is a solid pattern for notebook‑based implementations...&amp;nbsp;&lt;SPAN&gt;Git serves as the source of truth, with personal workspaces intended solely for development purposes. Bundles are responsible for deploying notebooks and job definitions into the workspace. In non-development targets, the run_as parameter is configured to use the per-application service principal, ensuring that all production runs utilise that principal’s permissions. This setup includes access to the appropriate volume/schema, which is critical for maintaining consistency and security throughout the deployment process.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The only design choice you still need is where in the workspace Bundles deploy to. You don’t have to use /Workspace/Shared. You can pick any isolated path, for example&amp;nbsp;&lt;SPAN&gt;/Workspace/.bundle/prod/${bundle.name} or&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;/Workspace/Projects/&amp;amp;lt;app_name&amp;amp;gt;/... and&amp;nbsp;&lt;/SPAN&gt;lock that path down so only t&lt;SPAN&gt;he &lt;/SPAN&gt;&lt;SPAN&gt;application service principal&lt;/SPAN&gt;&lt;SPAN&gt;, a&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;small operator group, and o&lt;/SPAN&gt;&lt;SPAN&gt;ptionally CI/CD deployer principals&amp;nbsp;&lt;/SPAN&gt;have access. The path naming is up to you. Bundles just need a root_path per target, and you control the permissions there.&lt;/P&gt;
&lt;P&gt;So I would keep your 4‑step approach and add a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;per‑app workspace root&lt;/SPAN&gt;&lt;SPAN&gt; (instead of &lt;/SPAN&gt;&lt;SPAN&gt;/Shared&lt;/SPAN&gt;&lt;SPAN&gt;), with ACLs granting access only to the relevant SP and operators.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2. The service principal exists only in Databricks, so what email and PAT should be provided to enable GIT access?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;With the Bundles‑from‑Azure‑DevOps pattern you described, the important nuance is that your Databricks service principal does not need to talk directly to Git to make this work.&amp;nbsp;In a typical Azure DevOps setup..&amp;nbsp;Azure DevOps pipelines clone the Git repo themselves using the identity configured in DevOps (service connection, PAT, or Microsoft Entra–backed principal).&amp;nbsp;Once the code is on the build agent, the pipeline calls databricks bundle validate/deploy/run using the Databricks service principal to authenticate to Databricks, not to Git.&lt;/P&gt;
&lt;P&gt;In that model, you do not need to configure a Git email/PAT on the Databricks SP at all.&amp;nbsp;Git credentials live entirely in Azure DevOps (for checking out the repo).The Databricks SP is only used for workspace authentication (via OAuth M2M, workload identity federation, or an ARM service connection).&amp;nbsp;You only need Git credentials on the Databricks SP if you also want it to use Git folders / Repos in the workspace, or run Git‑backed jobs directly from Databricks (using Git‑with‑jobs / Git folders).&lt;/P&gt;
&lt;P&gt;In that case, the email/PAT would belong to a non‑human Azure DevOps identity (service principal or technical user) that has access to the repo. You then link those Git credentials to the Databricks SP via the Git integration tab in the workspace.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. How will service principal get access to the Azure GIT repo (ADO repository)?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In a two-layer setup, the first layer involves Azure DevOps and a Git repository. In this configuration, you create a service principal or technical user with at least Basic access and repository permissions in Azure DevOps. This identity is utilised for your pipelines to check out the code, and it is managed within Azure DevOps, not in Databricks.&lt;/P&gt;
&lt;P&gt;The second layer connects Azure DevOps to Databricks through a Databricks service principal. To set this up, you configure an Azure DevOps service connection that authenticates to Databricks using methods such as OAuth M2M, Azure Resource Manager connection, or the recommended workload identity federation (which avoids long-lived secrets). Your pipeline steps will involve commands like `databricks bundle validate -t prod`, `databricks bundle deploy -t prod`, and `databricks bundle run -t prod &amp;lt;job_name&amp;gt;`, with the Databricks CLI already authenticated as the service principal.&lt;/P&gt;
&lt;P&gt;For a Bundles-only flow, the Databricks service principal does not require direct Git access. It simply needs to support CLI/API calls from the pipeline. However, if you want the Databricks service principal to operate on Git folders within the workspace, you must grant the DevOps identity access to the repository (Basic + repo permissions) and link its Git credentials to your Databricks service principal under the settings for Git integration with Azure DevOps (using PAT or Entra-based authentication).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4. Is there any other access that the service principal needs for this approach, for bundles etc ?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;For the exact permission model and how to wire this up, the official docs cover it in more detail..&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://&amp;nbsp;https://learn.microsoft.com/azure/databricks/dev-tools/ci-cd" target="_self"&gt;&lt;STRONG&gt;CI/CD on Azure Databricks (incl. Bundles + service principals)&lt;/STRONG&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://&amp;nbsp;https://learn.microsoft.com/azure/databricks/dev-tools/auth/service-principals" target="_self"&gt;&lt;STRONG&gt;Service principals for CI/CD&lt;/STRONG&gt; (what entitlements/permissions they need)&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://&amp;nbsp;https://learn.microsoft.com/azure/databricks/repos/automate-with-ms-entra" target="_self"&gt;&lt;STRONG&gt;Authorize a Microsoft Entra service principal to access Git folders&lt;/STRONG&gt; &lt;/A&gt;(if you decide the SP should access Git folders directly)&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://&amp;nbsp;https://learn.microsoft.com/azure/databricks/dev-tools/auth/auth-with-azure-devops" target="_self"&gt;&lt;STRONG&gt;Authenticate with Azure DevOps on Azure Databricks&lt;/STRONG&gt;&lt;/A&gt; (how the DevOps pipeline authenticates as the SP)&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://&amp;nbsp;https://docs.databricks.com/dev-tools/bundles/settings#run_as" target="_self"&gt;&lt;STRONG&gt;Bundles &lt;CODE class="p8i6j0f"&gt;run_as&lt;/CODE&gt; configuration&lt;/STRONG&gt; &lt;/A&gt;(how to set the SP as the run identity in targets)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;DIV class="tk0j8o1 _1ibi0s31a _1ibi0s3dn"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Mar 2026 13:55:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/152177#M53780</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-03-26T13:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Service Principal access notebooks created under /Workspace/Users</title>
      <link>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/152756#M53870</link>
      <description>&lt;P&gt;Thank you so much Ashwin, this provides a lot of clarity.&lt;/P&gt;&lt;P&gt;1. Where to deploy Bundles in the workspace&lt;/P&gt;&lt;P&gt;We plan to deploy the bundle using a service principal , so the bundle we plan to deploy under /Workspace/&amp;lt;service_principal&amp;gt;&lt;/P&gt;&lt;P&gt;1. Create notebooks under personal user account&lt;BR /&gt;2. Create jobs as .yml files to call these notebooks&lt;BR /&gt;3. Push the code to GIT&lt;BR /&gt;4. Create bundles&lt;BR /&gt;5. Deploy the bundle using azure pipelines using the service principal&lt;/P&gt;&lt;P&gt;This would deploy the bundle under the service_principal account and make it the owner of the jobs as well.&lt;BR /&gt;These jobs would be later executed via a seperate secheduling tool called Control-M&lt;/P&gt;&lt;P&gt;2. Source as Azure GIT repo vs Workspace&lt;/P&gt;&lt;P&gt;From your response we understand that the serive principal needs access to GIT if the source type of our jobs is GIT. But if we define jobs with source: WORKSPACE, serive principal&lt;BR /&gt;need not have access to GIT.&lt;BR /&gt;As these are 2 seperate approaches -&amp;gt; 1. Source type as GIT and 2. Source as Workspace . Is there a benefit of one approach over the other?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3. CI/CD using DAB&lt;/P&gt;&lt;P&gt;We are currently using the python wheel approach , in which we run the pytests as part of the Azure pipeline.&lt;BR /&gt;When we are using DAB, whats the best process to run these pytests?&lt;BR /&gt;In some places its mentioned that these tests need to be run as a seperate job. I didnt find a place where it defines the best practices for these&lt;BR /&gt;pytests when deploying notebooks using DAB&lt;/P&gt;&lt;P&gt;4. Notebooks vs python tasks&lt;BR /&gt;If we are deploying purely python script, is there a recommendation of using 1 over the other?&lt;BR /&gt;In a python wheel approach, we define an entry point, but dont see an option to do that with notebooks, hence need to call the main function explicity. Is that the correct approach&lt;BR /&gt;&lt;BR /&gt;5. Also, for some reason the links that you provided are not opening correctly, not sure if something got changed while pasting them.&lt;/P&gt;&lt;P&gt;Thank you again for your support, highly appreciate you taking the time to research and respond.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Komal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2026 15:36:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/152756#M53870</guid>
      <dc:creator>DineshOjha</dc:creator>
      <dc:date>2026-03-31T15:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Service Principal access notebooks created under /Workspace/Users</title>
      <link>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/152768#M53873</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/147238"&gt;@DineshOjha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Updated links below. Will respond to your queries before the end of this week.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://https//learn.microsoft.com/azure/databricks/dev-tools/ci-cd" target="_self" rel="nofollow noreferrer"&gt;&lt;STRONG&gt;CI/CD on Azure Databricks (incl. Bundles + service principals)&lt;/STRONG&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://https//learn.microsoft.com/azure/databricks/dev-tools/auth/service-principals" target="_self" rel="nofollow noreferrer"&gt;&lt;STRONG&gt;Service principals for CI/CD&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(what entitlements/permissions they need)&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://https//learn.microsoft.com/azure/databricks/repos/automate-with-ms-entra" target="_self" rel="nofollow noreferrer"&gt;&lt;STRONG&gt;Authorize a Microsoft Entra service principal to access Git folders&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;(if you decide the SP should access Git folders directly)&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://https//learn.microsoft.com/azure/databricks/dev-tools/auth/auth-with-azure-devops" target="_self" rel="nofollow noreferrer"&gt;&lt;STRONG&gt;Authenticate with Azure DevOps on Azure Databricks&lt;/STRONG&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(how the DevOps pipeline authenticates as the SP)&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://https//docs.databricks.com/dev-tools/bundles/settings#run_as" target="_self" rel="nofollow noreferrer"&gt;&lt;STRONG&gt;Bundles&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="p8i6j0f"&gt;run_as&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;configuration&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;(how to set the SP as the run identity in targets)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2026 16:26:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/152768#M53873</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-03-31T16:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Service Principal access notebooks created under /Workspace/Users</title>
      <link>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/154144#M54069</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/147238"&gt;@DineshOjha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I lost track of this... just remembered. Please see the responses below.&amp;nbsp;&lt;/P&gt;
&lt;P data-pm-slice="1 1 []"&gt;&lt;STRONG&gt;1. Where to deploy Bundles in the workspace&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Your proposed flow&amp;nbsp;&lt;SPAN&gt;is perfectly &lt;/SPAN&gt;compatible with Bundles and CI/CD best practices.&amp;nbsp;On the workspace location... technically, you can set the target’s root_path to something like&amp;nbsp;/Workspace/&amp;lt;service_principal&amp;gt;/&amp;lt;app_name&amp;gt; and deploy there, as long as the deploying identity (C&lt;SPAN&gt;I/CD SP) has permission to write into that path and h&lt;/SPAN&gt;&lt;SPAN&gt;umans who need to debug (e.g., app team) have at least read access.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The Bundles docs commonly show a pattern like&amp;nbsp;/Workspace/.bundle/${bundle.target}/${bundle.name} (or a similar structured path), and then you secure that folder.&amp;nbsp;So structurally, you have two good options.&amp;nbsp;&lt;SPAN&gt;Per‑SP home, per app subfolder (&lt;/SPAN&gt;&lt;SPAN&gt;/Workspace/&amp;lt;service_principal&amp;gt;/&amp;lt;app_name&amp;gt;) and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Neutral "system" root for all bundles (&lt;/SPAN&gt;&lt;SPAN&gt;/Workspace/.bundle/prod/${bundle.name}).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;From Databricks’ perspective, both are fine as long as the ACLs are correct. For a large estate (200+ apps), the neutral .bundle namespace tends to age better for discoverability and governance, but your per‑SP approach is not wrong.. It’s more of an org‑convention choice.&lt;/P&gt;
&lt;P&gt;Running the jobs from Control‑M is also fine. You’re just triggering Databricks jobs via API, and the location of deployed assets doesn’t change that.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2. Source as Azure GIT repo vs Workspace&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Your understanding is correct.&amp;nbsp;If a job is configured with source = Git (Git‑with‑jobs, or Git folders), then the Databricks identity that pulls from Git (user or SP) needs Git credentials/permissions.&amp;nbsp;If a job is configured with source = Workspace (tasks point at workspace notebook paths), and Azure DevOps does the git checkout and then calls databricks bundle deploy, then the Databricks service principal does not need Git access.&amp;nbsp;DevOps talks to Git.... the SP only talks to Databricks.&lt;/P&gt;
&lt;P&gt;Bundles already assume Git is your source of truth and handle deployment from the checked‑out repo into the workspace.&amp;nbsp;In that model, it’s very common to use WORKSPACE as the job source (tasks reference the deployed notebook/script paths), and let Bundles + CI/CD ensure that workspace state is in sync with Git.&lt;/P&gt;
&lt;P&gt;With the workspace source (with Bundles) approach, the simpler mental model is Git → CI/CD → Bundles → workspace; jobs read workspace. You also get full power of Bundles: targets, run_as, permissions, deployment modes, etc. And, there is no need to manage Git credentials on the Databricks SP unless you also use Git folders directly.&lt;/P&gt;
&lt;P&gt;Git source (Git‑with‑jobs) approach is most useful if you aren’t using Bundles and want jobs to pull from Git directly at run time.&amp;nbsp;More limited job/task types, and job configuration itself isn’t in source control in the same way as with Bundles.&lt;/P&gt;
&lt;P&gt;Given you are standardising on Bundles and already using Azure DevOps, you may want to consider workspace&amp;nbsp;source for jobs (deployed by Bundles), and keep Git access concentrated in Azure DevOps and any interactive developer identities.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. CI/CD using DAB&lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-pm-slice="1 1 []"&gt;The core best practice doesn’t change with Bundles.&amp;nbsp;Keep unit tests (pytest) in your CI system, close to the code.&amp;nbsp;This is still the primary mechanism for fast feedback and correctness, regardless of Bundles.&lt;/P&gt;
&lt;P&gt;What Bundles add is a good place for integration tests where you define a test/run-unit-tests job as a resource inside the bundle (for example a small job that runs a test notebook or a script calling your wheel).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The official Azure DevOps + Bundles example shows this pattern: build/test artifact, then deploy bundle, then run a test job from the bundle.&amp;nbsp;So...&amp;nbsp;keep pytests in Azure Pipelines as you do today, and optionally add bundle‑defined test jobs for integration/end‑to‑end checks.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4. Notebooks vs python tasks&lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-pm-slice="1 1 []"&gt;A common pattern that fits what you’re doing today...&amp;nbsp;Keep all real logic in a wheel (or at least a Python package).&amp;nbsp;In jobs, either run a python_wheel_task directly (no notebook at all), or use a very thin notebook that imports your wheel and calls main() with parameters.&lt;/P&gt;
&lt;P&gt;That gives you the best of both worlds. Testability and CI friendliness from the wheel, plus optional notebook ergonomics when you want them.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Apr 2026 20:56:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/service-principal-access-notebooks-created-under-workspace-users/m-p/154144#M54069</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-04-11T20:56:46Z</dc:date>
    </item>
  </channel>
</rss>

