Here’s a quick guide on how to connect Azure DevOps to Azure using the Service Principle.
Go to Azure and register a new app as shown:


After registration, create a secret:

From Azure copy:
Client ID

Tenant ID

Subscription ID – From Azure Portal.
Value of Secret

Now go to subscription, and add service principle as Contributor (or whatever access you need), so the app has permissions for deployments.


Now, go to DevOps and create a connection as shown:



You will need the 5 items copied from Azure Portal, ie.
- Subscription ID
- Subscription Name
- Client ID
- Secret Value
- Tenant ID
And hit verify and save:


You’re now good to use the connection from DevOps and use it to deploy resources in Azure
Q: What is a service connection in Azure DevOps?
A: A service connection in Azure DevOps is a secure and encrypted link between a project in Azure DevOps and another service or tool, like Azure, GitHub, Docker, or a custom service, that allows the project to interact with the external resource.
Q: How do I create a service connection in Azure DevOps?
A: To create a service connection in Azure DevOps, go to your project’s settings, select ‘Service connections,’ then select ‘New service connection.’ From there, select the appropriate connection type and authentication method, provide the necessary credentials, and configure the connection name and scope.
Q: What are the types of connections that can be created in a service connection in Azure DevOps?
A: The types of connections that can be created in a service connection in Azure DevOps include Azure, Azure Resource Manager Service, Docker, External Service, GitHub, and many more.
Q: What is a service principal?
A: A service principal is an identity in Azure Active Directory that a service or application can use to authenticate and connect to Azure resources, like a subscription or a resource group.
Q: How do I use a service connection in Azure DevOps?
A: To use a service connection in Azure DevOps, you must configure it in your pipeline or release pipeline. This can be done by adding the service connection to the YAML pipeline definition or by selecting it from the appropriate drop-down menu in the pipeline creation wizard. From there, you can authenticate with the external service or resource and execute the necessary tasks or commands.
Q: What is Azure Resource Manager?
A: Azure Resource Manager is the deployment and management service in Azure that enables you to create, update, and delete resources in a consistent and predictable manner.
Q: How do I create a new service connection in Azure?
A: To create a new service connection in Azure, go to your Azure account’s ‘App registrations’ page, register a new application, generate a client secret, and grant the application the necessary permissions. From there, you can configure the service connection in Azure DevOps using the ‘Azure Resource Manager’ connection type and the ‘Service principal (manual)’ authentication method.
Q: What are the authentication methods available when creating a service connection in Azure DevOps?
A: The authentication methods available when creating a service connection in Azure DevOps are ‘Service principal (manual),’ ‘Service principal (Azure subscription),’ ‘Managed Identity (Azure services),’ ‘OAuth,’ and ‘Personal Access Token.’
Q: What is the scope of a service connection in Azure DevOps?
A: The scope of a service connection in Azure DevOps determines which pipelines and projects can use the connection. The scope can be set to ‘Project’ (available to all pipelines in the project) or ‘Pipeline’ (available only to the selected pipeline).
Q: What is a client secret in Azure?
A: A client secret in Azure is a password or key that is used to authenticate and connect to an application or service, like Azure DevOps, that has been registered in Azure Active Directory with an app registration.
keywords: use the service connection, use the service connection, create service connection, repository, project settings, azure devops service connection, azure account, azure pipelines, azure pipelines, app service, azure devops pipeline, connection from azure