Search Tutorials


Top Azure DevOps Interview Questions (2026) | JavaInuse

Top 20 Azure DevOps Interview Questions and Answers


  1. What is Azure DevOps?
  2. What are the main components of Azure DevOps?
  3. What is Azure Repos?
  4. What are Azure Pipelines?
  5. What is the difference between Classic and YAML pipelines?
  6. What are Azure Boards?
  7. What is Azure Artifacts?
  8. What is Azure Test Plans?
  9. How do you implement CI/CD in Azure DevOps?
  10. What are Pipeline Triggers?
  11. What are Pipeline Variables and Variable Groups?
  12. What are Pipeline Stages, Jobs, and Steps?
  13. What are Service Connections?
  14. What are Pipeline Templates?
  15. How do you implement multi-stage deployments?
  16. What are Environments in Azure Pipelines?
  17. How do you secure Azure Pipelines?
  18. What are Release Gates and Approvals?
  19. How do you integrate Azure DevOps with other tools?
  20. What are Azure DevOps best practices?

Microsoft Azure Interview Questions

Comprehensive interview questions for Azure cloud services and data engineering roles.

1. What is Azure DevOps?

Azure DevOps is a comprehensive set of development services for planning, developing, testing, and delivering software.

Key Capabilities:
- Version Control: Git repos, TFVC
- CI/CD: Build and release pipelines
- Project Management: Boards, backlogs, sprints
- Testing: Manual and automated testing
- Package Management: Artifacts feeds

Deployment Options:
- Azure DevOps Services: Cloud-hosted (SaaS)
- Azure DevOps Server: On-premises

Organization Hierarchy:
Organization
├── Project 1
│   ├── Repos
│   ├── Pipelines
│   ├── Boards
│   ├── Test Plans
│   └── Artifacts
├── Project 2
│   └── ...
└── Organization Settings
    ├── Users
    ├── Security
    ├── Billing
    └── Extensions

2. What are the main components of Azure DevOps?

ServicePurposeFeatures
Azure BoardsWork trackingKanban, Scrum, backlogs, queries
Azure ReposVersion controlGit, TFVC, PRs, branch policies
Azure PipelinesCI/CDBuild, test, deploy automation
Azure Test PlansTestingManual, exploratory, automated
Azure ArtifactsPackage managementNuGet, npm, Maven, Python

Each service can be:
- Used independently
- Integrated with other services
- Replaced with third-party tools

3. What is Azure Repos?

Azure Repos provides version control for your source code with Git or TFVC.

# Clone repository
git clone https://dev.azure.com/org/project/_git/repo

# Set up Git credential manager
git config --global credential.helper manager-core

# Create feature branch
git checkout -b feature/my-feature

# Push changes
git add .
git commit -m "Add new feature"
git push -u origin feature/my-feature

# Create pull request (via CLI)
az repos pr create --title "My Feature" --description "Description" --source-branch feature/my-feature --target-branch main

Branch Policies:
Branch Policy Settings:
├── Require minimum number of reviewers (e.g., 2)
├── Check for linked work items
├── Check for comment resolution
├── Limit merge types (squash, rebase)
├── Build validation (require passing build)
├── Status checks (external validations)
└── Automatically include reviewers

4. What are Azure Pipelines?

Azure Pipelines automatically build, test, and deploy code to any platform.

Supported Languages/Platforms:
- .NET, Java, Node.js, Python, Go
- Docker, Kubernetes
- Android, iOS, Windows, Linux, macOS

# Basic YAML Pipeline
trigger:
  branches:
    include:
      - main
      - develop

pool:
  vmImage: 'ubuntu-latest'

steps:
- task: NodeTool@0
  inputs:
    versionSpec: '18.x'
  displayName: 'Install Node.js'

- script: |
    npm install
    npm run build
  displayName: 'npm install and build'

- task: PublishBuildArtifacts@1
  inputs:
    pathtoPublish: 'dist'
    artifactName: 'drop'

Pipeline Types:
- Build Pipeline: Compile and test code
- Release Pipeline: Deploy to environments
- Multi-stage Pipeline: Build + Deploy in one YAML

5. What is the difference between Classic and YAML pipelines?

AspectClassicYAML
InterfaceGUI-based editorCode as config
Version ControlStored in Azure DevOpsStored in repo
BranchingManual cloneAutomatic per branch
TemplatesTask groupsYAML templates
PR ValidationLimitedFull support
Multi-stageSeparate releaseSingle file
Learning CurveLowerHigher

# Classic equivalent in YAML
# Build stage
stages:
- stage: Build
  jobs:
  - job: BuildJob
    pool:
      vmImage: 'ubuntu-latest'
    steps:
    - script: dotnet build
    - publish: $(Build.ArtifactStagingDirectory)
      artifact: drop

# Release stage (was separate in Classic)
- stage: Deploy
  dependsOn: Build
  jobs:
  - deployment: DeployWeb
    environment: 'production'
    strategy:
      runOnce:
        deploy:
          steps:
          - download: current
            artifact: drop
          - task: AzureWebApp@1
            inputs:
              appName: 'myapp'

6. What are Azure Boards?

Azure Boards provides tools for planning, tracking, and discussing work across teams.

Work Item Types (Agile Process):
Epic
├── Feature 1
│   ├── User Story 1.1
│   │   ├── Task 1.1.1
│   │   ├── Task 1.1.2
│   │   └── Bug 1.1.3
│   └── User Story 1.2
└── Feature 2

Process Templates:
- Basic: Issue, Task
- Agile: Epic, Feature, User Story, Task, Bug
- Scrum: Epic, Feature, PBI, Task, Bug, Impediment
- CMMI: Epic, Feature, Requirement, Task, Bug

Key Features:
- Kanban boards with customizable columns
- Sprint planning and tracking
- Backlog management
- Queries for custom views
- Dashboards and reporting




7. What is Azure Artifacts?

Azure Artifacts enables teams to share packages and manage dependencies.

# Supported Package Types:
- NuGet (.NET)
- npm (JavaScript)
- Maven/Gradle (Java)
- Python (pip)
- Universal Packages

# Example: Publish npm package
# .npmrc in project
registry=https://pkgs.dev.azure.com/org/project/_packaging/feed/npm/registry/
always-auth=true

# Authenticate
npm config set //pkgs.dev.azure.com/org/project/_packaging/feed/npm/registry/:_authToken $(System.AccessToken)

# Publish
npm publish

# In pipeline
- task: Npm@1
  inputs:
    command: 'publish'
    workingDir: '$(System.DefaultWorkingDirectory)'
    publishRegistry: 'useFeed'
    publishFeed: 'project/feed'

Upstream Sources:
- Connect to public registries (npmjs, nuget.org)
- Cache packages locally
- Control which packages are allowed

8. What is Azure Test Plans?

Azure Test Plans provides tools for planned manual testing, exploratory testing, and stakeholder feedback.

Components:
- Test Plans: Container for test suites
- Test Suites: Group of test cases
- Test Cases: Individual tests with steps

Test Plan Structure:
├── Regression Test Plan
│   ├── Suite: Login Tests
│   │   ├── TC001: Valid login
│   │   ├── TC002: Invalid password
│   │   └── TC003: Locked account
│   ├── Suite: Cart Tests
│   │   └── ...
│   └── Suite: Checkout Tests
│       └── ...

# Run automated tests in pipeline
- task: VSTest@2
  inputs:
    testSelector: 'testAssemblies'
    testAssemblyVer2: |
      **\*test*.dll
      !**\*TestAdapter.dll
    searchFolder: '$(System.DefaultWorkingDirectory)'
    runInParallel: true
    codeCoverageEnabled: true
    publishRunAttachments: true

9. How do you implement CI/CD in Azure DevOps?

# Complete CI/CD Pipeline
trigger:
  branches:
    include:
      - main
  paths:
    exclude:
      - docs/*
      - README.md

variables:
  buildConfiguration: 'Release'
  dotnetVersion: '7.0.x'

stages:
# CI Stage
- stage: Build
  displayName: 'Build and Test'
  jobs:
  - job: Build
    pool:
      vmImage: 'ubuntu-latest'
    steps:
    - task: UseDotNet@2
      inputs:
        version: $(dotnetVersion)
    
    - task: DotNetCoreCLI@2
      displayName: 'Restore'
      inputs:
        command: 'restore'
        projects: '**/*.csproj'
    
    - task: DotNetCoreCLI@2
      displayName: 'Build'
      inputs:
        command: 'build'
        arguments: '--configuration $(buildConfiguration)'
    
    - task: DotNetCoreCLI@2
      displayName: 'Test'
      inputs:
        command: 'test'
        arguments: '--configuration $(buildConfiguration) --collect:"XPlat Code Coverage"'
    
    - task: PublishCodeCoverageResults@1
      inputs:
        codeCoverageTool: 'Cobertura'
        summaryFileLocation: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
    
    - task: DotNetCoreCLI@2
      displayName: 'Publish'
      inputs:
        command: 'publish'
        arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)'
    
    - publish: $(Build.ArtifactStagingDirectory)
      artifact: drop

# CD Stages
- stage: DeployDev
  displayName: 'Deploy to Dev'
  dependsOn: Build
  jobs:
  - deployment: Deploy
    environment: 'development'
    strategy:
      runOnce:
        deploy:
          steps:
          - task: AzureWebApp@1
            inputs:
              azureSubscription: 'Azure-Connection'
              appName: 'myapp-dev'
              package: '$(Pipeline.Workspace)/drop/*.zip'

- stage: DeployProd
  displayName: 'Deploy to Production'
  dependsOn: DeployDev
  condition: succeeded()
  jobs:
  - deployment: Deploy
    environment: 'production'
    strategy:
      runOnce:
        deploy:
          steps:
          - task: AzureWebApp@1
            inputs:
              azureSubscription: 'Azure-Connection'
              appName: 'myapp-prod'
              package: '$(Pipeline.Workspace)/drop/*.zip'

10. What are Pipeline Triggers?

# 1. CI Trigger (continuous integration)
trigger:
  branches:
    include:
      - main
      - release/*
    exclude:
      - feature/experimental
  paths:
    include:
      - src/*
    exclude:
      - docs/*
  tags:
    include:
      - v*

# 2. PR Trigger (pull request validation)
pr:
  branches:
    include:
      - main
  paths:
    include:
      - src/*

# 3. Scheduled Trigger
schedules:
- cron: "0 0 * * *"
  displayName: 'Daily midnight build'
  branches:
    include:
      - main
  always: true  # Run even if no changes

# 4. Pipeline Trigger (triggered by another pipeline)
resources:
  pipelines:
  - pipeline: build-pipeline
    source: 'Build-Pipeline'
    trigger:
      branches:
        include:
          - main

# 5. Manual Trigger (no automatic trigger)
trigger: none
pr: none

11. What are Pipeline Variables and Variable Groups?

# Pipeline Variables
variables:
  # Inline variables
  buildConfiguration: 'Release'
  
  # Secret variables (mark as secret in UI)
  # $(apiKey) - accessed but not printed

  # Variable groups reference
  - group: 'production-secrets'
  
  # Template reference
  - template: variables/common.yml

# Predefined variables
$(Build.BuildId)
$(Build.SourceBranch)
$(System.DefaultWorkingDirectory)
$(Pipeline.Workspace)
$(Agent.OS)

# Variable scopes
variables:
  # Pipeline level
  globalVar: 'pipeline-value'

stages:
- stage: Build
  variables:
    # Stage level
    stageVar: 'stage-value'
  jobs:
  - job: BuildJob
    variables:
      # Job level
      jobVar: 'job-value'

# Runtime variables
- script: echo "##vso[task.setvariable variable=myVar;isOutput=true]value"
  name: setVar

# Use in another job
- script: echo $(setVar.myVar)

# Variable Groups (shared across pipelines)
# Created in Library section
# Can link to Azure Key Vault
variables:
- group: 'my-variable-group'

steps:
- script: echo $(secretFromKeyVault)

12. What are Pipeline Stages, Jobs, and Steps?

# Pipeline Hierarchy
Pipeline
├── Stage 1 (Build)
│   ├── Job 1 (Build-Windows)
│   │   ├── Step 1: Checkout
│   │   ├── Step 2: Build
│   │   └── Step 3: Publish
│   └── Job 2 (Build-Linux)
│       └── ...
├── Stage 2 (Test)
│   └── Job 1 (Run-Tests)
└── Stage 3 (Deploy)
    └── Job 1 (Deploy-App)

# YAML Example
stages:
- stage: Build
  displayName: 'Build Stage'
  jobs:
  - job: BuildWindows
    displayName: 'Build on Windows'
    pool:
      vmImage: 'windows-latest'
    steps:
    - checkout: self
    - script: echo Building on Windows
    
  - job: BuildLinux
    displayName: 'Build on Linux'
    pool:
      vmImage: 'ubuntu-latest'
    steps:
    - script: echo Building on Linux

- stage: Test
  displayName: 'Test Stage'
  dependsOn: Build
  condition: succeeded()
  jobs:
  - job: IntegrationTests
    steps:
    - script: echo Running tests

# Job Dependencies
jobs:
- job: A
  steps:
  - script: echo A
- job: B
  dependsOn: A
  condition: succeeded()
- job: C
  dependsOn: 
    - A
    - B
  condition: |
    and(
      succeeded('A'),
      succeeded('B')
    )

13. What are Service Connections?

Service Connections securely store credentials for connecting to external services.

Common Types:
- Azure Resource Manager (ARM)
- Docker Registry
- Kubernetes
- GitHub
- Generic (username/password, SSH)

# Use in pipeline
- task: AzureWebApp@1
  inputs:
    azureSubscription: 'My-Azure-Connection'  # Service connection name
    appName: 'myapp'

# Azure CLI with service connection
- task: AzureCLI@2
  inputs:
    azureSubscription: 'My-Azure-Connection'
    scriptType: 'bash'
    scriptLocation: 'inlineScript'
    inlineScript: |
      az webapp list

# Docker service connection
- task: Docker@2
  inputs:
    containerRegistry: 'My-Docker-Registry'
    repository: 'myapp'
    command: 'buildAndPush'
    Dockerfile: '**/Dockerfile'

# Kubernetes service connection
- task: Kubernetes@1
  inputs:
    connectionType: 'Kubernetes Service Connection'
    kubernetesServiceEndpoint: 'My-K8s-Connection'
    command: 'apply'
    arguments: '-f manifests/'

14. What are Pipeline Templates?

Templates allow reusing pipeline configurations across multiple pipelines.

# templates/build-template.yml
parameters:
- name: buildConfiguration
  type: string
  default: 'Release'
- name: dotnetVersion
  type: string
  default: '7.0.x'

steps:
- task: UseDotNet@2
  inputs:
    version: [null]
- task: DotNetCoreCLI@2
  inputs:
    command: 'build'
    arguments: '--configuration [null]'

# Main pipeline - azure-pipelines.yml
trigger:
  - main

pool:
  vmImage: 'ubuntu-latest'

stages:
- stage: Build
  jobs:
  - job: Build
    steps:
    - template: templates/build-template.yml
      parameters:
        buildConfiguration: 'Release'
        dotnetVersion: '7.0.x'

# Job template
# templates/deploy-job.yml
parameters:
- name: environment
  type: string
- name: appName
  type: string

jobs:
- deployment: Deploy
  environment: [null]
  strategy:
    runOnce:
      deploy:
        steps:
        - task: AzureWebApp@1
          inputs:
            appName: [null]

# Use job template
stages:
- stage: Deploy
  jobs:
  - template: templates/deploy-job.yml
    parameters:
      environment: 'production'
      appName: 'myapp-prod'

15. How do you implement multi-stage deployments?

# Multi-stage deployment with approvals
stages:
- stage: Build
  jobs:
  - job: Build
    steps:
    - script: dotnet publish -o $(Build.ArtifactStagingDirectory)
    - publish: $(Build.ArtifactStagingDirectory)
      artifact: app

- stage: DeployDev
  displayName: 'Deploy to Development'
  dependsOn: Build
  jobs:
  - deployment: DeployDev
    environment: 'dev'
    strategy:
      runOnce:
        deploy:
          steps:
          - download: current
            artifact: app
          - task: AzureWebApp@1
            inputs:
              appName: 'myapp-dev'

- stage: DeployStaging
  displayName: 'Deploy to Staging'
  dependsOn: DeployDev
  jobs:
  - deployment: DeployStaging
    environment: 'staging'  # Configure approval in environment
    strategy:
      runOnce:
        deploy:
          steps:
          - download: current
            artifact: app
          - task: AzureWebApp@1
            inputs:
              appName: 'myapp-staging'

- stage: DeployProd
  displayName: 'Deploy to Production'
  dependsOn: DeployStaging
  condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
  jobs:
  - deployment: DeployProd
    environment: 'production'  # Requires approval
    strategy:
      canary:  # Canary deployment
        increments: [10, 50]
        deploy:
          steps:
          - task: AzureWebApp@1
            inputs:
              appName: 'myapp-prod'
              deploymentSlotName: 'staging'
        on:
          success:
            steps:
            - task: AzureAppServiceManage@0
              inputs:
                Action: 'Swap Slots'

16. What are Environments in Azure Pipelines?

Environments represent deployment targets and provide approval gates, deployment history, and resource management.

# Environment Types:
1. Virtual Machines
2. Kubernetes (AKS, on-prem)
3. Azure Web Apps (via deployment)

# Environment Features:
├── Approvals and Checks
│   ├── Manual approvals
│   ├── Business hours check
│   ├── Invoke Azure Function
│   └── Query Azure Monitor
├── Deployment History
├── Resources (VMs, K8s, etc.)
└── Security (permissions)

# Using environment in pipeline
jobs:
- deployment: Deploy
  environment: 'production'
  strategy:
    runOnce:
      deploy:
        steps:
        - script: echo Deploying

# Environment with Kubernetes resource
- deployment: Deploy
  environment: 'production.my-namespace'  # environment.namespace
  strategy:
    runOnce:
      deploy:
        steps:
        - task: KubernetesManifest@0
          inputs:
            action: 'deploy'
            manifests: 'manifests/*.yml'

# Deployment strategies
strategy:
  runOnce:     # Deploy to all targets at once
  rolling:     # Deploy in batches
    maxParallel: 2
  canary:      # Gradual rollout
    increments: [10, 20, 50, 100]

17. How do you secure Azure Pipelines?

# 1. Secure Variables
variables:
- name: apiKey
  value: $(SECRET_API_KEY)  # From variable group linked to Key Vault

# 2. Branch Policies
# - Require PR reviews
# - Build validation
# - Limit who can push

# 3. Protected Resources
# Configure approvals on:
# - Service connections
# - Environments
# - Variable groups

# 4. Agent Pool Security
pool:
  name: 'Self-Hosted-Secure'
  demands:
    - agent.os -equals Windows_NT

# 5. Limit Job Authorization Scope
# Project Settings > Pipelines > Settings
# - Limit job authorization scope to current project
# - Limit job authorization scope to referenced repos

# 6. Pipeline Permissions
# Restrict who can:
# - Create/edit pipelines
# - Approve runs
# - Access resources

# 7. Secure Files
- task: DownloadSecureFile@1
  name: myCert
  inputs:
    secureFile: 'certificate.pfx'
- script: |
    echo Installing certificate from $(myCert.secureFilePath)

# 8. Runtime Parameters (prevent injection)
parameters:
- name: environment
  type: string
  values:
    - dev
    - staging
    - prod  # Only allowed values




18. What are Release Gates and Approvals?

# Configure in Environment settings:
# Approvals
├── Pre-deployment approvals
│   ├── Specific users/groups
│   ├── Timeout (72 hours default)
│   └── Instructions for approvers
├── Post-deployment approvals
└── Checks
    ├── Azure Function (custom validation)
    ├── REST API (external system check)
    ├── Query Azure Monitor (health check)
    ├── Invoke Azure Function
    ├── Business Hours
    └── Required template

# Example: Query Azure Monitor for health
# Check that error rate is below threshold before deploy
checks:
- type: queryazuremonitor
  settings:
    connectedServiceName: 'Azure Monitor'
    resourceGroupName: 'myRG'
    resourceType: 'Application Insights'
    resourceName: 'myapp-insights'
    query: |
      requests
      | where timestamp > ago(5m)
      | summarize failureRate = sum(success == false) * 100.0 / count()
    upperThreshold: 5  # Fail if error rate > 5%

# Example: Invoke REST API for change approval
checks:
- type: invokerestapi
  settings:
    connectedServiceName: 'ServiceNow Connection'
    method: 'POST'
    urlSuffix: '/api/change/validate'
    body: '{"changeId": "$(changeRequestId)"}'
    successCriteria: 'eq(root.status, "approved")'

19. How do you integrate Azure DevOps with other tools?

# 1. GitHub Integration
resources:
  repositories:
  - repository: github-repo
    type: github
    endpoint: 'GitHub-Connection'
    name: 'org/repo'

steps:
- checkout: github-repo

# 2. Slack/Teams Notifications
# Install extension: Slack/Teams integration
- task: SlackNotification@1
  inputs:
    slackConnection: 'Slack-Connection'
    notificationType: 'ChatMessage'
    message: 'Build $(Build.BuildNumber) completed'

# 3. SonarQube Integration
- task: SonarQubePrepare@5
  inputs:
    SonarQube: 'SonarQube-Connection'
    scannerMode: 'MSBuild'
    projectKey: 'my-project'

- task: DotNetCoreCLI@2
  inputs:
    command: 'build'

- task: SonarQubeAnalyze@5
- task: SonarQubePublish@5

# 4. Terraform Integration
- task: TerraformInstaller@0
  inputs:
    terraformVersion: 'latest'
    
- task: TerraformTaskV3@3
  inputs:
    provider: 'azurerm'
    command: 'apply'
    workingDirectory: '$(System.DefaultWorkingDirectory)/terraform'
    environmentServiceNameAzureRM: 'Azure-Connection'

# 5. ServiceNow Integration
# Create change request before deployment
- task: ServiceNow-DevOps-Change-Automation@1
  inputs:
    connectedServiceName: 'ServiceNow'
    changeRequestDetails: |
      {
        "short_description": "Deploy $(Build.BuildNumber)",
        "assignment_group": "DevOps"
      }

# 6. Jira Integration
- task: JiraUpdateIssue@1
  inputs:
    jiraEndpoint: 'Jira-Connection'
    issueKey: '$(JiraIssueKey)'
    status: 'Done'

20. What are Azure DevOps best practices?

1. Repository Structure:
repo/
├── .azure-pipelines/
│   ├── azure-pipelines.yml
│   └── templates/
│       ├── build.yml
│       └── deploy.yml
├── src/
├── tests/
├── docs/
└── README.md

2. Pipeline Design:
- Use YAML pipelines for version control
- Implement templates for reusability
- Keep pipelines fast with parallelization
- Use caching for dependencies

# Caching example
- task: Cache@2
  inputs:
    key: 'npm | "$(Agent.OS)" | package-lock.json'
    path: '$(Pipeline.Workspace)/.npm'
    restoreKeys: |
      npm | "$(Agent.OS)"

3. Security:
- Use variable groups with Key Vault
- Implement branch policies
- Configure environment approvals
- Limit service connection access

4. Testing:
- Run unit tests in CI
- Implement integration tests
- Use test impact analysis
- Publish code coverage

5. Deployment:
- Use deployment slots for zero-downtime
- Implement health checks
- Use feature flags
- Have rollback strategy

6. Monitoring:
- Set up pipeline analytics
- Configure alerts for failures
- Track deployment frequency
- Monitor lead time and MTTR

7. Documentation:
- Document pipeline configurations
- Maintain runbooks
- Use Wiki for team knowledge

Microsoft Azure Interview Questions

Comprehensive interview questions for Azure cloud services and data engineering roles.


Popular Posts