cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to Azure DevOps repository using service principle

thushar
Contributor

My source code is in the VSTS repository and I am using PAT token to connect VSTS from Azure data bricks notebook and then building packages and installing my cluster. For the production environment, I can't use PAT token, so is there any way to connect to VSTS DevOps repo using service principle.

I could able to connect source control (VSTS) from databricks notebook and clone the source code, build packages using pip, and install it. But in order to connect source control from Azure notebook, I am using PAT token created in VSTS. Because of security reasons, I can't use PAT to connect source control instead I have to use another authentication method, so the question is whether I can use a service principal to connect VSTS source control from databricks notebook.

3 REPLIES 3

Kaniz_Fatma
Community Manager
Community Manager

Hi @ thushar! My name is Kaniz, and I'm the technical moderator here. Great to meet you, and thanks for your question! Let's see if your peers in the community have an answer to your question first. Or else I will get back to you soon. Thanks.

Ryan_Chynoweth
Esteemed Contributor

Can you provide a bit more information about what you are attempting to do?

You have a repository that is cloned inside a development Databricks environment, and you are unable to connect the same repository in a production Databricks environment?

martinez
New Contributor III

Hey everyone

I've been working with Azure DevOps and VSTS repositories, and I can relate to the challenges of connecting them securely. thushar, I understand your concern about using a PAT token for production environments. Fortunately, there is indeed a way to connect to VSTS DevOps repo using a service principal.

Instead of relying on a PAT token, you can leverage a service principal authentication method. Service principals provide a more secure approach for accessing resources in Azure. By creating a service principal and granting it appropriate permissions, you can establish a connection to your VSTS source control from your Databricks notebook.

To get started, you'll need to create a service principal in Azure Active Directory (AAD) and assign it the necessary permissions to access your VSTS repository. Once you have the service principal credentials, you can use them to authenticate and interact with the VSTS repository directly from your notebook.

Remember to carefully manage and secure the service principal credentials, as provide access to your resources. Regularly rotate and monitor the credentials to maintain a high level of security.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group