Azure DevOps interview questions and answers for pipeline and release engineers

Azure DevOps interview questions are mostly about Azure Pipelines: multi-stage YAML, agents and pools, variables and variable groups, templates, deployment jobs, environments with approvals, and service connections to cloud subscriptions. Expect a few questions on Repos branch policies, Boards work items and Azure Artifacts feeds as well. The question that separates candidates is often the simplest one to ask: when does each variable syntax get its value?

By Published 6 min read

Where Azure DevOps questions come from

Azure DevOps is common in organizations that build on Microsoft technology, in enterprises with long-running .NET estates, and in teams that started with Team Foundation Server years ago. Interviews for DevOps, build and release, and platform roles in those companies ask about it directly. The product is not the same thing as the Azure cloud: questions about resource groups, VNets or managed identities belong to Azure interview questions. Strategy questions that any CI tool raises are on CI/CD interview questions.

  1. Product tourWhat each service does and how a work item, a commit, a pull request and a build link together.
  2. Pipeline readingA multi-stage azure-pipelines.yml on screen. You explain the triggers, which stage runs when, and where the secrets come from.
  3. Migration or designMoving classic release pipelines to YAML, or designing templates that fifty teams must use.
  4. OperationsAgents that are always busy, a service connection with too much access, a deployment that skipped its approval.

Fundamentals questions

Product and pipeline basics
QuestionWhat it testsWhat a strong answer shows
What are the main Azure DevOps services?Product mapBoards for work tracking, Repos for Git, Pipelines for CI and CD, Test Plans for manual and exploratory testing, and Artifacts for package feeds. Teams can use one service without the others.
Azure DevOps Services versus Azure DevOps Server?HostingServices is the cloud offering Microsoft runs. Server is the self-hosted product, chosen for data residency or network isolation, with its own upgrade cycle and sometimes lagging features.
YAML pipelines versus classic pipelines?Pipeline typesYAML pipelines live in the repository, are reviewed like code and can hold build and deploy in one multi-stage file. Classic build and release pipelines are configured in the web UI. New work generally goes to YAML.
How is a YAML pipeline structured?HierarchyStages contain jobs, jobs contain steps, and a step is a script or a task. A small pipeline can skip stages and jobs and list steps directly.
Microsoft-hosted versus self-hosted agents?AgentsHosted agents are fresh VMs per job with common tools installed. Self-hosted agents run on your machines, which you need for private networks, special tooling or warm caches, and which you must patch and secure.
What is an agent pool and what are demands?RoutingA pool is a set of agents a pipeline can target. Demands ask for agents with certain capabilities, such as a tool or an OS, so a job lands on a machine that can run it.
How do triggers work?Triggerstrigger covers CI on pushes, pr covers pull requests for GitHub and Bitbucket repositories, schedules uses cron, and a pipelines resource can trigger one pipeline when another completes.
How do you build on pull requests in Azure Repos?Branch policiesThrough a build validation branch policy on the target branch. The pr keyword in YAML does not apply to Azure Repos, which surprises many candidates.
What do dependsOn and condition do?Flow controldependsOn sets the order of stages or jobs. condition decides whether one runs, for example and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')).
Pipeline artifacts versus Azure Artifacts?NamingPipeline artifacts are files a run publishes for later stages or download. Azure Artifacts is the package service that hosts npm, NuGet, Maven and Python feeds with upstream sources.
Product and pipeline basics. Scroll sideways on a small screen.

A multi-stage pipeline to walk through

trigger:
  branches:
    include: [main]

variables:
  - group: shop-api-settings
  - name: npm_config_cache
    value: $(Pipeline.Workspace)/.npm

stages:
  - stage: Build
    jobs:
      - job: Test
        pool:
          vmImage: ubuntu-latest
        steps:
          - task: Cache@2
            inputs:
              key: 'npm | "$(Agent.OS)" | package-lock.json'
              path: $(npm_config_cache)
          - script: npm ci && npm test
            displayName: Install and test
          - task: PublishTestResults@2
            condition: succeededOrFailed()
            inputs:
              testResultsFiles: reports/junit.xml
          - publish: dist
            artifact: web

  - stage: DeployProd
    dependsOn: Build
    condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
    jobs:
      - deployment: Web
        environment: shop-production
        pool:
          vmImage: ubuntu-latest
        strategy:
          runOnce:
            deploy:
              steps:
                - task: AzureCLI@2
                  inputs:
                    azureSubscription: shop-prod-connection
                    scriptType: bash
                    scriptLocation: inlineScript
                    inlineScript: ./deploy.sh "$(Pipeline.Workspace)/web"
Build and test on every push to main, publish the output once, then deploy that same artifact through an environment whose approvals are set in the web UI.
  • Where are the approvals? Not in the YAML. Approvals and checks are configured on the shop-production environment, so a pipeline author cannot delete them in a pull request.
  • Why does the deploy stage not download the artifact explicitly? Deployment jobs download the run's pipeline artifacts automatically into the workspace.
  • What does `succeededOrFailed()` do on the test results task? It publishes results when tests fail too, but not when the run was cancelled.
  • What does the variable group add? Shared, centrally managed settings, optionally linked to Azure Key Vault so secrets are read at run time instead of copied into the pipeline.
  • How would you add a staging stage? Another deployment stage before production with its own environment, and production's dependsOn pointing at staging so the same artifact moves forward.

Variables, templates and expressions

Azure Pipelines has three ways to read a variable, and each is resolved at a different moment. Many senior interviews return to this table, because it explains a whole class of "why is this empty" bugs.

Intermediate questions
QuestionWhat it testsWhat a strong answer shows
$(var), ${{ variables.var }} and $[variables.var]: what is the difference?Evaluation timeTemplate expressions are expanded when the YAML is compiled, before any job runs. Macro syntax is replaced just before a task runs. Runtime expressions are evaluated at run time and are used in conditions and variable definitions.
Why is a secret variable empty inside my script?SecretsSecret variables are not mapped into a script's environment automatically. Map them explicitly with env: on the step, which also keeps them masked in logs.
How do you pass a value from one job to another?Output variablesSet it with a ##vso[task.setvariable variable=name;isOutput=true] logging command in a named step, then read it in the next job through dependencies.<job>.outputs['<step>.name'], or stageDependencies across stages.
What kinds of templates exist?ReuseStep, job, stage and variable templates are included where they are used. An extends template wraps the whole pipeline so the template controls the structure and the caller only fills parameters.
Why use typed parameters instead of variables in templates?Template designParameters are known at compile time, can be typed and limited to allowed values, and can drive ${{ if }} and ${{ each }}. Variables can change at run time and cannot shape the pipeline.
How do you enforce that every pipeline runs a security scan?GovernancePublish an extends template that injects the scan, then add a required template check on protected resources such as the production environment or service connection, so pipelines that do not extend it cannot use them.
How do you use code from a second repository?ResourcesDeclare it under resources: repositories and add another checkout step, or reference templates from it with template: file.yml@alias.
What is System.AccessToken?Job identityA token for the build identity that lets scripts call Azure DevOps APIs. It must be mapped into the script explicitly, and the build identity's permissions should be kept narrow.
How do you stop two runs deploying at once?ConcurrencyAn exclusive lock check on the environment, with the pipeline set to deploy runs one after another or to skip to the latest. Combined with immutable artifacts, the newest build wins in a known way.
How do you speed up a slow pipeline?PerformanceLook at the run's timeline per job. Then cache package downloads, run independent jobs in parallel, split tests across jobs, avoid rebuilding in deploy stages, and consider self-hosted agents with warm caches.
Intermediate questions. Scroll sideways on a small screen.
# templates/node-tests.yml
parameters:
  - name: nodeVersions
    type: object
    default: ['20.x', '22.x']
  - name: runLint
    type: boolean
    default: true

jobs:
  - ${{ each version in parameters.nodeVersions }}:
      - job: test_${{ replace(version, '.', '_') }}
        pool:
          vmImage: ubuntu-latest
        steps:
          - task: NodeTool@0
            inputs:
              versionSpec: ${{ version }}
          - script: npm ci && npm test
          - ${{ if eq(parameters.runLint, true) }}:
              - script: npm run lint
A job template with typed parameters: one test job per Node version, generated when the pipeline is compiled.

Senior and scenario questions

Security, governance and migration
ScenarioWhat it testsWhat a strong answer shows
Every pipeline uses one service connection with Owner rights on the subscription.Least privilegeSplit connections per environment and scope each to a resource group with the narrowest role. Prefer workload identity federation over stored client secrets, and restrict which pipelines may use each connection.
A production deployment went out without the approval anyone expected.ControlsCheck whether the job was a deployment job targeting the environment at all; a plain job with a script bypasses environment checks. Then move approvals to the environment and service connection, and protect the YAML with branch policies.
You must move forty classic release pipelines to YAML.MigrationInventory stages, variables, gates and approvals. Build an extends template that covers the common shape, convert one service first, recreate approvals as environment checks, run both paths briefly, then disable the classic ones.
Builds queue for twenty minutes during the day.CapacityMeasure queue time per pool. Add parallel job capacity, autoscaling self-hosted agents (for example on a VM scale set or Kubernetes), and remove work that does not need to block a merge.
Teams publish packages that break consumers.ArtifactsUse feed views to promote tested versions to a release view, upstream sources for public packages, and semantic versioning enforced in the pipeline before publishing.
A pull request changed the pipeline YAML to print a secret.TrustRotate the secret. Limit which branches can use secret-holding variable groups and service connections, require review on pipeline files, and keep secrets out of pull request validation builds from forks.
Leadership wants work items linked to every production change.TraceabilityBranch policies that require linked work items on pull requests, and deployments through environments so each work item shows where its change was released.
How would you plan a move from Azure DevOps Server to the cloud service?PlanningCheck the server version and the supported migration path, inventory extensions, agents and service hooks, run a dry run, and plan the cutover with a freeze window and agent re-registration.
Security, governance and migration. Scroll sideways on a small screen.

Fictional example

Answering "Why does this condition never run the deploy stage?"
Interviewer
This stage has condition: eq(variables.deployEnabled, 'true'), and a script in the build stage sets deployEnabled to true. The stage is always skipped. Why?
Candidate
Variables set by a script with a logging command only exist inside that job, unless the step marks them as outputs. So the deploy stage sees the variable as it was declared at the start, which is not 'true'. I would name the step, set the variable with isOutput=true, and change the stage condition to read it through dependencies.Build.outputs, keyed by the job name, the step name and the variable. I would also ask whether a script should decide this at all. If deploys should only happen from main, a condition on the branch is easier to audit than a flag that any build script can flip.

A one-week Azure DevOps practice plan

  • Day 1: create a project, push a small app to Azure Repos and add a single-stage YAML pipeline. Link a commit to a work item.
  • Day 2: add caching, test result publishing and a pipeline artifact. Add a build validation branch policy on main.
  • Day 3: add a deployment stage targeting an environment with a manual approval, even if the deploy script only prints a message.
  • Day 4: move the build job into a template with typed parameters, then try an extends template.
  • Day 5: set an output variable in one job and read it in the next stage. Write down which variable syntax you used where, and why.
  • Days 6 and 7: answer the scenario table out loud, two minutes each, starting with what you would check first.

For the rest of the loop, read DevOps engineer interview questions and Terraform interview questions, since many Azure DevOps pipelines apply infrastructure code. If the team is weighing tools, GitLab CI interview questions shows how another platform approaches the same problems.

The variable-syntax question is easy to know and hard to say clearly under pressure. Natively, an AI interview assistant for Mac and Windows, transcribes your mock rounds on your own computer, so you can check whether "compile time" and "run time" came out in the right places. In practice it can also take a screenshot of a pipeline YAML or a failed run's log and point to a likely cause, and with Pro or the free trial it can use the résumé and job description you have added. Your notes and transcripts remain there for later review.

Questions people ask

What Azure DevOps questions are asked in interviews?

Mostly Azure Pipelines: YAML versus classic, stages, jobs and steps, agents and pools, variable syntax, templates, deployment jobs, environments with approvals and service connections. Some rounds add Repos branch policies, Boards and Artifacts feeds.

What is the difference between $(var), ${{ }} and $[ ] in Azure Pipelines?

Template expressions in ${{ }} are expanded when the YAML compiles, macro syntax $(var) is replaced just before a task runs, and runtime expressions in $[ ] are evaluated while the run is in progress.

Is Azure DevOps the same as Azure?

No. Azure DevOps is a set of developer services for planning, source control, pipelines and packages. Azure is the cloud platform. Pipelines in Azure DevOps can deploy to Azure, other clouds or on-premises servers.

How do I prepare for an Azure DevOps interview?

Build a small multi-stage YAML pipeline with caching, an artifact, a deployment job to an environment with an approval and a template with parameters, then practice explaining when each variable syntax is resolved.

Where to go next

Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.

Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.

Keep reading

Put it on your own machine.

A live-conversation assistant that runs locally. Your conversations stay on your machine.

macOS 12+ · Windows 10/11

© 2026 Natively AI Private Limited

Source-available under the Natively Personal Use Source License v1.0 · IP geolocation by DB-IP