Skip to content
Cloud Computing

Azure DevOps Interview Questions: 10 Answers & Scenarios

Prepare for Azure DevOps interviews with clear answers on Pipelines, Repos, agents, security, and deployment strategies. Learn how to explain practical trade-offs and troubleshoot common pipeline issues.

Azure DevOps Interview Questions: 10 Answers & Scenarios

Azure DevOps interview questions and answers

Azure DevOps interviews test more than familiarity with Microsoft's tools. Interviewers want to know how you would use those tools to build, secure, release, and troubleshoot software. Strong answers pair clear definitions with practical decisions.

Azure DevOps interview questions commonly cover services such as Repos, Pipelines, and Artifacts. They also cover continuous integration, deployment strategies, security, and troubleshooting. A strong answer explains what a feature does, when you would use it, and which trade-offs or safeguards matter in a real project.

Azure DevOps interview questions and answers

The questions below include foundational topics and scenario-based prompts that often suit experienced candidates. Whatever company you interview with, including TCS, prepare to explain your own decisions. Interview questions vary by team, role, and project, so no single list covers them all.

Prerequisites for the hands-on examples

The hands-on examples in this article target Ubuntu 22.04 LTS with the Azure CLI and the Azure DevOps extension, using Azure DevOps Services. You need an Azure DevOps organization, a project, and a personal access token (PAT). For the examples below, a PAT with Project and Team Read, Code Read, Build Read and Execute, and Packaging Read scopes is enough. If you also create or modify resources, add the scopes those operations require.

Install the Azure CLI on Ubuntu 22.04 LTS:

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Check that the installation worked:

az --version

The output includes an Azure CLI version line, such as:

azure-cli                         2.60.0
core                              2.60.0
telemetry                          1.1.0

Install the Azure DevOps extension:

az extension add --name azure-devops

Confirm that the extension is installed:

az extension show --name azure-devops --output table

The output includes a row with the extension name:

Name
--------------
azure-devops

Sign in to Azure for commands that require an Azure subscription:

az login

Check the active Azure account:

az account show --output table

The output shows the account name, cloud name, subscription ID, and state:

Name          CloudName    SubscriptionId                        State
------------  -----------  ------------------------------------  -------
Your Account  AzureCloud   xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  Enabled

Set the PAT in your current shell session, then sign in to Azure DevOps. Never commit the PAT to source control or write it into a pipeline file.

export AZURE_DEVOPS_EXT_PAT='YOUR_PAT'
echo "$AZURE_DEVOPS_EXT_PAT" | az devops login --organization https://dev.azure.com/YOUR_ORG

Check that authentication and organization access work:

az devops project list --organization https://dev.azure.com/YOUR_ORG --output table

The output lists your projects with name, ID, and state:

Name             Id                                   State
---------------  -----------------------------------  -------
YOUR_PROJECT     xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  wellFormed

Set default organization and project values for the commands that follow:

az devops configure --defaults organization=https://dev.azure.com/YOUR_ORG project=YOUR_PROJECT

Check the defaults you configured:

az devops configure --list

The output looks like this:

organization = https://dev.azure.com/YOUR_ORG
project = YOUR_PROJECT

1. What is Microsoft Azure DevOps?

Microsoft Azure DevOps is a set of cloud services and on-premises products for planning, developing, testing, and delivering software. Its main services are Azure Boards, Azure Repos, Azure Pipelines, Azure Test Plans, and Azure Artifacts. You can use one or more of them, depending on your project. Microsoft describes the Azure DevOps services and their roles.

Azure DevOps Services is the cloud-hosted offering. Azure DevOps Server is the self-hosted product. In an interview, also separate the product from DevOps itself. DevOps is a set of practices and a way of working. Azure DevOps is one toolset that helps teams apply those practices.

2. What are continuous integration and continuous delivery in Azure Pipelines?

Continuous integration (CI) and continuous delivery (CD) in Azure Pipelines are practices that you put into place with pipeline stages, jobs, and steps to build, test, and promote software. With CI, developers merge code changes often, and the pipeline builds and tests each change automatically. CD automates the steps that prepare validated software for release. It often requires an approval before the software reaches production.

Azure Pipelines is the Azure DevOps service that automates builds, tests, and deployments. A pipeline can define stages, jobs, and steps. For example, a build stage might compile code and publish an artifact. Later stages then deploy that artifact to test and production environments. Microsoft's pipeline stages documentation explains this structure.

In an interview, describe the flow and the checks you would add, not just the acronym. Mention test results, artifact handling, approvals where they make sense, and how the pipeline responds to a failure. After you trigger a run, you can inspect it from the CLI:

az pipelines run --name YOUR_PIPELINE_NAME --branch main --output table

The output includes the run ID and status:

ID    BuildNumber    Status
----  -------------  ---------
1234  20260101.1     inProgress

Check the run details:

az pipelines runs show --id YOUR_RUN_ID --output json

The output is JSON that includes fields such as status, result, and the source version.

3. What is the difference between YAML and classic pipelines?

YAML and classic pipelines are two configuration models in Azure Pipelines. YAML pipelines are defined in a file and versioned with your code. Classic pipelines are configured in the web UI. Because YAML lives with the code, you can review pipeline changes and version them alongside application changes.

Classic pipelines still help teams that manage configuration through the interface or maintain existing projects. The right choice depends on your team's requirements and current setup. Avoid claiming that one format is always better. A useful answer explains the trade-off and how you would keep pipeline configuration maintainable. Microsoft documents the YAML and classic pipeline options.

4. What is an Azure Pipelines agent, and when would you use a self-hosted agent?

An Azure Pipelines agent is the process that runs a pipeline job. It runs either on Microsoft-hosted infrastructure or on a self-hosted machine that you manage. Microsoft manages hosted agents. Self-hosted agents run on infrastructure your organization manages. Microsoft's agent documentation covers both types.

Microsoft-hosted agents reduce the work of maintaining build machines. A self-hosted agent suits builds that need private-network access, specialized tools, or control over the build environment. The downside is that your team must maintain and secure that machine.

When you answer, connect the choice to the project's needs. For example, explain how private network access or a required dependency could affect which agent you pick. Also explain how you would manage access and updates for a self-hosted machine. If a self-hosted agent runs behind a firewall, allow outbound HTTPS 443 to Azure DevOps. Do not open inbound ports to the public internet. Check agent pools and agent status with the CLI:

az pipelines pool list --output table

The output lists pool IDs and names:

Id    Name
----  --------------------
1     Default
2     YOUR_POOL
az pipelines agent list --pool-id YOUR_POOL_ID --output table

The output lists agent names and their status:

Name          Status
------------  --------
YOUR_AGENT    online

On the self-hosted Ubuntu 22.04 LTS host, find the agent service and check its status:

systemctl --type=service | grep -i vsts

The output includes a service name, such as:

vsts.agent.YOUR_ORG.YOUR_POOL.YOUR_AGENT.service
sudo systemctl status vsts.agent.YOUR_ORG.YOUR_POOL.YOUR_AGENT --no-pager

A healthy service shows as active and running:

Active: active (running)

5. What are Azure Artifacts, and how do teams use them?

Azure Artifacts is a package-management service that hosts and shares packages through feeds. Teams use feeds to manage packages such as NuGet, npm, Maven, and Python packages, including packages that only your organization uses. Microsoft explains Azure Artifacts feeds and package types.

A strong answer distinguishes a package feed from a build artifact. A feed stores packages for reuse and dependency management. A pipeline artifact is output from a pipeline run, such as a compiled application package that a later stage deploys.

Explain how you would manage package access, versions, and dependencies. For senior roles, be ready to discuss how you would prevent accidental dependency changes and keep builds repeatable. Deleting a feed is destructive. Before you delete anything, verify retention requirements and downstream consumers. List your feeds to confirm access:

az artifacts feed list --output table

The output lists feed names, IDs, and types:

Name          Id                                   Type
------------  -----------------------------------  --------
YOUR_FEED     xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  internal

6. What is a service connection, and how do you protect credentials in a pipeline?

A service connection is a configured connection that lets a pipeline authenticate to an external service without putting credentials in pipeline code. Teams use service connections to reach services such as an Azure subscription or a container registry. Microsoft documents service connections as service endpoints.

To protect credentials, limit access. Give each task only the identity and permissions it needs. Store secrets in approved secure mechanisms. Never commit them to source control or write them into logs. Where it makes sense, separate production access from lower-environment access, and review who can use or change each connection. Never disable TLS/SSL verification or grant broad service connection permissions just to make a pipeline pass.

A strong answer covers both configuration and risk. Explain how you would control permissions and how you would investigate a suspected credential exposure. Don't stop at saying the pipeline uses a secret. List your service connections to confirm their names and scopes:

az devops service-endpoint list --output table

The output lists service connection names, types, and IDs:

Name                   Type          Id
---------------------  ------------  ------------------------------------
YOUR_SERVICE_CONNECTION  AzureRM      xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

7. How do branch policies help protect code in Azure Repos?

A branch policy is a rule that sets requirements before changes can merge into a protected branch in Azure Repos. Azure Repos policies can require pull requests, code reviews, build validation, or other checks. These checks help teams catch problems before code is integrated. Microsoft lists the available branch policy options.

A practical answer might describe protecting the main branch, requiring a successful build, and asking reviewers to approve changes. The rules should fit the team. Policies that are too strict or poorly maintained block routine work. Missing checks let risky changes through. Never weaken a branch policy or bypass a required check without a documented exception.

For senior candidates, explain how you would balance review quality, release urgency, and clear ownership of policy exceptions. List repositories and policies to verify the configuration:

az repos list --output table

The output lists repository names, IDs, and default branches:

Name          Id                                   DefaultBranch
------------  -----------------------------------  --------------
YOUR_REPO     xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  refs/heads/main
az repos policy list --repository-id YOUR_REPO_ID --branch main --output table

The output lists policy types and whether each one is enabled and blocking:

Type                 Enabled    Blocking
-------------------  ---------  ----------
Require a merge ...  True       True
Build validation     True       True

8. How would you manage approvals and environment-specific deployments?

Approvals and environment-specific deployments in Azure Pipelines control how releases reach targets such as development, staging, and production. Environments represent deployment targets. They give you a place to track deployment history and configure checks. An approval or other check can stop a stage from running until its requirements are met. Microsoft explains approvals and checks.

Keep environment-specific configuration separate from application code. Store secrets in suitable secure storage. For a production deployment, describe who approves the release, what evidence they review, and how the pipeline blocks an unapproved stage from running. List environments to confirm they exist and are referenced correctly:

az pipelines environment list --output table

The output lists environment names and IDs:

Name    Id
------  ----
dev     1
test    2
prod    3

Don't rely on approvals as your only safety measure. Explain how testing, access control, monitoring, and a recovery plan support a reliable release process.

9. Scenario: A production deployment fails after the pipeline succeeds. What would you do?

A production deployment can fail even when the pipeline succeeds. The failure might come from a health, configuration, or runtime problem. Diagnose it from deployment logs, telemetry, and the exact version you deployed. First, check the deployment logs and release details. Confirm what changed, which version went out, and whether the failure affects all users or only one service or environment.

Next, assess the impact and follow your team's release process. If the deployment is causing an incident, stop the rollout. Then use the documented recovery option, such as restoring the previous known-good version, if that fits the system. Verify recovery with health checks and monitoring, and communicate the status. Investigate the root cause before you retry. Don't roll back database or data changes unless you have confirmed that the rollback is safe and matches the application version.

A senior answer also explains how to preserve evidence and prevent a repeat. For example, you might add a missing validation step, improve health checks, or correct the environment configuration. Inspect the failed run and its logs:

az pipelines runs show --id YOUR_RUN_ID --output json

The output is JSON that includes the run status, result, and links to logs. Then check recent runs of the same pipeline:

az pipelines runs list --pipeline-ids YOUR_PIPELINE_ID --output table

The output lists run IDs, results, and statuses. Use it to compare the failed deployment with previous successful runs.

10. Scenario: How would you design a pipeline that deploys the same application to development, test, and production?

Build the application once, publish a versioned artifact, and promote that same artifact through each environment. Add checks at each step. Building once reduces the risk that different environments receive different builds of the same source revision.

Use stages or deployment jobs to control the progression. Configure environment-specific settings separately. Require the right checks before production. Keep credentials out of the repository, and limit which identities or users can deploy to each target. The YAML example below targets Ubuntu 22.04 LTS. It builds and tests once, publishes a pipeline artifact, and promotes that artifact through development, test, and production. Approvals are configured on the production environment in the Azure DevOps UI, not in the YAML.

trigger:
  branches:
    include:
      - main

pr:
  branches:
    include:
      - main

pool:
  vmImage: ubuntu-22.04

variables:
  buildConfiguration: Release

stages:
  - stage: Build
    displayName: Build and test
    jobs:
      - job: BuildAndTest
        displayName: Build, test, and publish artifact
        steps:
          - task: UseDotNet@2
            inputs:
              packageType: sdk
              version: 8.x
          - script: dotnet restore
            displayName: Restore dependencies
          - script: dotnet build --configuration $(buildConfiguration) --no-restore
            displayName: Build
          - script: dotnet test --configuration $(buildConfiguration) --no-build --logger trx
            displayName: Test
          - script: dotnet publish --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)/app
            displayName: Publish application
          - task: PublishPipelineArtifact@1
            inputs:
              targetPath: $(Build.ArtifactStagingDirectory)/app
              artifact: drop

  - stage: Deploy_Dev
    displayName: Deploy to development
    dependsOn: Build
    jobs:
      - deployment: DeployDev
        environment: dev
        strategy:
          runOnce:
            deploy:
              steps:
                - download: current
                  artifact: drop
                - script: echo "Deploying to dev from $(Pipeline.Workspace)/drop"
                  displayName: Deploy to dev

  - stage: Deploy_Test
    displayName: Deploy to test
    dependsOn: Deploy_Dev
    jobs:
      - deployment: DeployTest
        environment: test
        strategy:
          runOnce:
            deploy:
              steps:
                - download: current
                  artifact: drop
                - script: echo "Deploying to test from $(Pipeline.Workspace)/drop"
                  displayName: Deploy to test

  - stage: Deploy_Prod
    displayName: Deploy to production
    dependsOn: Deploy_Test
    condition: succeeded()
    jobs:
      - deployment: DeployProd
        environment: prod
        strategy:
          runOnce:
            deploy:
              steps:
                - download: current
                  artifact: drop
                - script: echo "Deploying to production from $(Pipeline.Workspace)/drop"
                  displayName: Deploy to production

If you are preparing for Azure DevOps interview questions for 5 years or 10 years of experience, the interviewer may expect more than a list of tools. Explain how you would handle approvals, failures, access, and environment differences. State the trade-offs behind your design. This makes your answers stronger in scenario-based Azure DevOps interviews.

For broader preparation, see these practical DevOps interview questions and scenarios and the DevOps engineer roadmap for 2026.

Troubleshooting

Start troubleshooting Azure DevOps CLI and pipeline failures by checking the CLI version, authentication, the organization and project defaults, and the exact error text. The errors below are common in Azure DevOps Services with the Azure CLI on Ubuntu 22.04 LTS.

Error: Azure CLI is not installed or not found. Reinstall it, then verify the version:

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az --version

The output includes an Azure CLI version line, such as azure-cli 2.60.0.

Error: the Azure DevOps extension is missing. Install it, then verify that it is present:

az extension add --name azure-devops
az extension show --name azure-devops --output table

The output includes a row with azure-devops.

Error: authentication or authorization failure, such as TF400813. The PAT may have expired, been revoked, or lack a required scope. Create a new PAT with the minimum scopes you need. Export it in your current shell, then sign in again:

export AZURE_DEVOPS_EXT_PAT='YOUR_PAT'
echo "$AZURE_DEVOPS_EXT_PAT" | az devops login --organization https://dev.azure.com/YOUR_ORG
az devops project list --organization https://dev.azure.com/YOUR_ORG --output table

The output lists projects. Never commit the PAT or paste it into pipeline YAML.

Error: No hosted parallelism has been purchased or granted. Your organization may not have free hosted parallelism, or it may have used up its grant. Check recent runs. Then either request free parallelism in the organization settings or use a self-hosted agent pool:

az pipelines runs list --output table
az pipelines pool list --output table

The output lists runs and pools. If you use a self-hosted pool, confirm that an agent is online:

az pipelines agent list --pool-id YOUR_POOL_ID --output table

The output shows an agent with the status online.

Error: a pipeline references a service connection that cannot be found. Confirm the service connection name and project scope:

az devops service-endpoint list --output table

The output lists service connection names, types, and IDs. Make sure the name in your YAML matches exactly. Also confirm that the connection is shared with the project that runs the pipeline.

Error: a self-hosted agent service is not running. Find the service name, then check its status and recent logs:

systemctl --type=service | grep -i vsts
sudo systemctl status vsts.agent.YOUR_ORG.YOUR_POOL.YOUR_AGENT --no-pager
sudo journalctl -u vsts.agent.YOUR_ORG.YOUR_POOL.YOUR_AGENT --no-pager -n 50

A healthy service shows active (running). If the service has failed, the journal output usually points to a permission, network, or configuration problem. Don't open inbound ports to the public internet to fix agent connectivity. The agent starts the connection itself with outbound HTTPS 443 to Azure DevOps.

Error: 401 Unauthorized when restoring packages from Azure Artifacts. Confirm that the feed exists and that the identity the pipeline uses has Packaging Read access:

az artifacts feed list --output table

The output lists feed names and IDs. In your pipeline, use the authentication task that matches the package type, such as NuGetAuthenticate@1 for NuGet or npmAuthenticate@0 for npm. Then grant the build identity access to the feed.

Key takeaways

  • Microsoft Azure DevOps brings together services for planning, source control, pipelines, testing, and package management.
  • Azure Pipelines automates builds, tests, and deployments. Choose YAML or classic pipelines based on your team's needs.
  • Agents, service connections, branch policies, and environment checks each cover a different part of pipeline operation and security.
  • Strong scenario answers explain the decision, the safeguards, the response to failure, and the trade-offs.

Conclusion

Prepare concise definitions, then practice applying them to real release and troubleshooting scenarios. Ritik Barnwal's DevOps resources can help you build that wider preparation.

Frequently asked questions

How do I install the Azure DevOps CLI on Ubuntu 22.04?

The Azure DevOps CLI on Ubuntu 22.04 uses the Azure CLI plus the Azure DevOps extension. Install the Azure CLI with curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash, then run az extension add --name azure-devops. Verify with az --version and az extension show --name azure-devops --output table.

What PAT permissions do Azure DevOps CLI examples need?

The examples need a PAT with Project and Team Read, Code Read, Build Read and Execute, and Packaging Read scopes. Those permissions cover the read and run operations shown. If you create or modify Azure DevOps resources, add the scopes required for those specific operations. Keep the PAT out of source control and pipeline files.

Does a self-hosted Azure Pipelines agent need inbound ports open?

No, a self-hosted Azure Pipelines agent does not need inbound ports open to the public internet. The agent initiates its connection to Azure DevOps using outbound HTTPS on port 443. On Ubuntu 22.04 LTS, check the agent service with sudo systemctl status vsts.agent.YOUR_ORG.YOUR_POOL.YOUR_AGENT --no-pager; a healthy service shows Active: active (running).

How do I deploy the same build to development, test, and production?

Build and test the application once, publish a versioned pipeline artifact, then promote that same artifact through development, test, and production. The article’s YAML example targets Ubuntu 22.04 LTS and uses ubuntu-22.04. Production approvals are configured on the prod environment in the Azure DevOps UI, not in the YAML.

Comments

Loading comments…

Leave a comment

All articles