Azure DevOps Engineer Expert

Question bank

Microsoft logo

Azure DevOps Engineer Expert

AZ-400

42 Azure DevOps Engineer Expert questions with the correct answer and a written explanation, organised across 5 exam domains.

42 questions
5 domains
Foundation level

Question index

Jump straight to any question. Answers and explanations are inline.

Design and implement a source control strategy

5 questions in this domain

  1. Question 1Single Choice

    Which version control system does Azure DevOps recommend for all new repositories?

    • AGitCorrect answer
    • BTeam Foundation Version Control (TFVC)
    • CSubversion
    • DMercurial

    Why this is the answer

    Git is the default and recommended version control system in Azure DevOps because it supports distributed workflows and modern branching strategies.

  2. Question 2Multiple Select

    Which of the following are benefits of using Git in Azure Repos?

    • ALocal commits and branching without network accessCorrect answer
    • BEvery developer has a full copy of the repository historyCorrect answer
    • CBranching and merging are fast and inexpensiveCorrect answer
    • DFiles can be locked to block concurrent edits

    Why this is the answer

    Git is distributed, so developers can commit, branch, and merge locally. Central file locking is a TFVC characteristic, not a Git benefit.

  3. Question 3Interactive

    What action does the command shown in the code block perform?

    • ACreates and switches to a new feature branchCorrect answer
    • BMerges a feature branch into the main branch
    • CDeletes the specified branch from the local repository
    • DPushes the current branch to the remote repository

    Why this is the answer

    The command checkout -b creates a new branch and immediately switches to it.

  4. Question 4Single Choice

    Which Azure Repos feature is used to require code review before changes are merged into the main branch?

    • ABranch policiesCorrect answer
    • BGit tags
    • CService hooks
    • DFork cloning

    Why this is the answer

    Branch policies in Azure Repos require a minimum number of reviewers and prevent direct pushes to protected branches.

  5. Question 5Multiple Select

    Which branching strategies are commonly used with Git?

    • AGitFlowCorrect answer
    • BGitHub FlowCorrect answer
    • CTrunk-Based DevelopmentCorrect answer
    • DCentralized Lock-Modify-Unlock

    Why this is the answer

    GitFlow, GitHub Flow, and Trunk-Based Development are common branching strategies. Lock-Modify-Unlock is associated with centralized version control.

Design and implement build and release pipelines

24 questions in this domain

  1. Question 6Single Choice

    Which file is the default YAML definition for an Azure Pipelines build pipeline?

    • Aazure-pipelines.ymlCorrect answer
    • Bbuild.yml
    • Cpipeline.json
    • DJenkinsfile

    Why this is the answer

    Azure Pipelines uses azure-pipelines.yml as the default convention for defining a YAML pipeline.

  2. Question 7Multiple Select

    Which two options are repository triggers used to start a pipeline automatically?

    • AContinuous integration (CI) triggerCorrect answer
    • BPull request (PR) triggerCorrect answer
    • CScheduled trigger
    • DManual review trigger

    Why this is the answer

    CI and PR triggers are repository-based automatic triggers in Azure Pipelines. Scheduled triggers are time-based and not repository triggers.

  3. Question 8Interactive

    In the YAML snippet, which event starts the pipeline automatically?

    • AA commit to the main branchCorrect answer
    • BA pull request to any branch
    • CA push to any branch except main
    • DManual execution only

    Why this is the answer

    The trigger includes main, so the pipeline starts automatically when a commit is pushed to the main branch.

  4. Question 9Single Choice

    Which YAML element defines where a pipeline job runs?

    • ApoolCorrect answer
    • Bsteps
    • Ctrigger
    • Dvariables

    Why this is the answer

    The pool keyword selects an agent pool, such as a Microsoft-hosted or self-hosted pool, for the job.

  5. Question 10Multiple Select

    Which two approval types can be configured in a classic release pipeline?

    • APre-deployment approvalCorrect answer
    • BPost-deployment approvalCorrect answer
    • CBuild signature approval
    • DMerge approval

    Why this is the answer

    Classic release pipelines can use pre-deployment and post-deployment approvals to control each release stage.

  6. Question 11Interactive

    How many jobs are defined in the YAML snippet?

    • AOneCorrect answer
    • BTwo
    • CThree
    • DZero

    Why this is the answer

    The snippet contains a single job named Build under the jobs collection.

  7. Question 12Single Choice

    What is the purpose of a pipeline variable in Azure DevOps?

    • AStore a value that can be used during pipeline executionCorrect answer
    • BStore compiled binaries
    • CDefine a branch policy
    • DCreate a new agent pool

    Why this is the answer

    Variables store values such as configuration settings or secrets that can be referenced throughout pipeline execution.

  8. Question 13Multiple Select

    Which two features help you reuse steps in Azure Pipelines?

    • ATask groupsCorrect answer
    • BTemplatesCorrect answer
    • CRelease gates
    • DSecure files

    Why this is the answer

    Task groups and templates are used to reuse steps or YAML content across multiple pipelines and jobs.

  9. Question 14Interactive

    What value will the script in the YAML snippet output?

    • AproductionCorrect answer
    • B$(environment)
    • Cenvironment
    • Dnull

    Why this is the answer

    The variable environment is defined as production, so the expression $(environment) evaluates to production.

  10. Question 15Single Choice

    Which Azure Pipelines concept provides a logical boundary for approvals and deployment conditions?

    • AEnvironmentCorrect answer
    • BArtifact
    • CTask
    • DBuild

    Why this is the answer

    An environment represents a deployment target and can be configured with approvals, checks, and deployment history.

  11. Question 16Multiple Select

    Which two are built-in deployment strategies in Azure Pipelines?

    • ARollingCorrect answer
    • BCanaryCorrect answer
    • CBlue-green
    • DRed-black

    Why this is the answer

    Azure Pipelines deployment jobs support runOnce, rolling, and canary as built-in deployment strategies.

  12. Question 17Interactive

    In the YAML snippet, which pipeline layer directly contains the Compile job?

    • AStageCorrect answer
    • BTask
    • CStep
    • DRelease

    Why this is the answer

    The Compile job is defined under the jobs collection of the Build stage, so the stage directly contains the job.

  13. Question 18Single Choice

    What is the purpose of a service connection in Azure DevOps?

    • AConnect to external services securelyCorrect answer
    • BStore test results
    • CSchedule releases
    • DManage code reviews

    Why this is the answer

    Service connections store credentials and other connection information needed to securely access external services.

  14. Question 19Multiple Select

    Which two artifact types can be published by a build pipeline in Azure DevOps?

    • APipeline artifactsCorrect answer
    • BBuild artifactsCorrect answer
    • CSQL database backups
    • DPDF reports

    Why this is the answer

    Azure Pipelines supports publishing and consuming pipeline artifacts and build artifacts from build and release stages.

  15. Question 20Interactive

    If three commits are pushed to main at the same time, how many builds will the trigger start?

    • AOne buildCorrect answer
    • BThree builds
    • CNo builds
    • DSix builds

    Why this is the answer

    The batch setting causes the pipeline to wait and run a single build for the latest commit when multiple commits arrive together.

  16. Question 21Single Choice

    What is the purpose of pipeline caching in Azure Pipelines?

    • AReuse dependencies and speed up later runsCorrect answer
    • BEncrypt pipeline secrets
    • CMonitor deployment status
    • DReplace unit testing

    Why this is the answer

    Pipeline caching stores dependencies or folders from one run and restores them later to reduce build time.

  17. Question 22Multiple Select

    Which two agent types are available for running Azure Pipelines jobs?

    • AMicrosoft-hosted agentsCorrect answer
    • BSelf-hosted agentsCorrect answer
    • CRemote browsers
    • DDatabase servers

    Why this is the answer

    Azure Pipelines supports Microsoft-hosted agents and self-hosted agents installed on infrastructure you manage.

  18. Question 23Interactive

    Which Azure DevOps task is being invoked in the YAML snippet?

    • AUseDotNetCorrect answer
    • BDotNetCoreCLI
    • CNuGetToolInstaller
    • DPowerShell

    Why this is the answer

    The task reference UseDotNet@2 is used to install a specified version of the .NET SDK.

  19. Question 24Single Choice

    What is a task group in Azure Pipelines?

    • AA reusable set of pipeline stepsCorrect answer
    • BA collection of pipeline variables
    • CA type of agent pool
    • DA build artifact container

    Why this is the answer

    A task group encapsulates a set of tasks into one reusable step that can be added to multiple pipelines.

  20. Question 25Multiple Select

    Which two activities are generally part of a build pipeline?

    • ACompiling source codeCorrect answer
    • BRunning unit testsCorrect answer
    • CManaging user access
    • DApproving production deployments

    Why this is the answer

    Build pipelines commonly compile code and run tests to validate changes before artifacts are released.

  21. Question 26Interactive

    Which deployment strategy is defined in the YAML snippet?

    • ArunOnceCorrect answer
    • Brolling
    • Ccanary
    • DblueGreen

    Why this is the answer

    The strategy keyword runOnce executes the deployment steps once and is the simplest deployment strategy.

  22. Question 27Single Choice

    What is the main purpose of an approval in a release pipeline?

    • AGate the deployment until an authorized user approvesCorrect answer
    • BCompile code faster
    • CEncrypt pipeline logs
    • DReplace unit tests

    Why this is the answer

    Approvals allow authorized users to review and approve a release before the deployment proceeds to a stage.

  23. Question 28Multiple Select

    Which two resource types can be connected as deployment targets in an Azure DevOps environment?

    • AVirtual machinesCorrect answer
    • BKubernetes clustersCorrect answer
    • CExcel files
    • DPowerPoint slides

    Why this is the answer

    Azure DevOps environments can target virtual machines and Kubernetes clusters for deployment jobs.

  24. Question 29Interactive

    Where are the variables referenced in the YAML snippet stored?

    • AA variable groupCorrect answer
    • BAn Azure Key Vault secret
    • CA pipeline cache
    • DA service connection

    Why this is the answer

    The variables keyword references a variable group named MyVariableGroup, so the variables are stored in that group.

Design and implement processes and communications

5 questions in this domain

  1. Question 30Single Choice

    What is the main purpose of a release gate in Azure Pipelines?

    • ATo evaluate specified conditions before or after a deployment and pause if unmetCorrect answer
    • BTo compile application source code and generate build artifacts
    • CTo automatically assign work items to team members after a release
    • DTo store release documentation and approval history

    Why this is the answer

    Release gates evaluate external conditions, such as quality metrics or incident status, and can pause or reject a deployment. They are not used for compilation, work item assignment, or documentation storage.

  2. Question 31Multiple Select

    Which Azure DevOps capabilities directly support communication and traceability when implementing process changes? (Choose all that apply.)

    • AWork item discussions and mentionsCorrect answer
    • BService hooks and notificationsCorrect answer
    • CPipeline variable groups
    • DBuild artifact feeds

    Why this is the answer

    Work item discussions and mentions provide context-specific collaboration, while service hooks and notifications keep teams informed. Variable groups and artifact feeds are configuration and package stores, not communication or traceability features.

  3. Question 32Interactive

    Examine the YAML pipeline snippet. What happens when a commit is pushed to 'main'?

    • AIt runs only when changes are pushed to the 'main' branchCorrect answer
    • BIt runs when any branch in the repository changes
    • CIt runs only for pull request validations
    • DIt runs on a scheduled nightly basis

    Why this is the answer

    The trigger section lists only 'main', so the pipeline starts only on commits to that branch. No PR trigger or schedule is defined; the pool value only selects the hosted runner image.

  4. Question 33Single Choice

    What is the purpose of a branch policy in Azure Repos?

    • ARequire pull request reviews and successful builds before changes are mergedCorrect answer
    • BDelete remote branches automatically after each release
    • CEncrypt repository files at rest
    • DPrevent developers from cloning the repository

    Why this is the answer

    Branch policies protect important branches by requiring pull request reviews, successful builds, and other checks before merging. They do not manage branch deletion, encryption, or clone permissions.

  5. Question 34Multiple Select

    Which actions help establish effective communication during an Azure DevOps incident? (Choose all that apply.)

    • ACreate a work item and link related evidenceCorrect answer
    • BUse @mention to call out the responsible team in commentsCorrect answer
    • CConfigure alerts on key pipeline and work item eventsCorrect answer
    • DDisable notifications to avoid distractions

    Why this is the answer

    Work items, @mentions, and targeted alerts all support transparent incident communication and traceability. Disabling notifications would prevent the team from receiving relevant updates during an incident.

Develop a security and compliance plan

5 questions in this domain

  1. Question 35Single Choice

    Which Azure DevOps element is used to grant or restrict permissions for users and groups across an organization?

    • ASecurity groupsCorrect answer
    • BService connections
    • CBuild agents
    • DArtifact feeds

    Why this is the answer

    Security groups are the core permission containers in Azure DevOps, allowing administrators to grant consistent access to projects, repositories, and pipelines.

  2. Question 36Multiple Select

    Which practices should be included when developing a security and compliance plan for Azure DevOps? (Choose all that apply.)

    • AEnforce multi-factor authenticationCorrect answer
    • BRotate personal access tokens and limit their scopeCorrect answer
    • CStore passwords in pipeline variables
    • DDisable auditing to reduce log volume

    Why this is the answer

    MFA and careful PAT lifecycle management reduce unauthorized access. Storing passwords in pipelines and disabling audit logs violate security and compliance best practices.

  3. Question 37Interactive

    The JSON below represents a security policy applied to a repository. What type of Azure DevOps feature is configured by this policy?

    • ABranch policiesCorrect answer
    • BService hooks
    • CRelease gates
    • DLibrary variable groups

    Why this is the answer

    The configuration enforces a minimum number of reviewers before a pull request can be merged, which is a branch policy in Azure DevOps.

  4. Question 38Single Choice

    What is the primary purpose of Azure DevOps audit logs in a compliance plan?

    • ADetect and investigate changes and access eventsCorrect answer
    • BAutomatically block all malicious users
    • CReplace the need for authentication policies
    • DStore source code backups

    Why this is the answer

    Audit logs provide a record of activities, including permission changes and sign-ins, enabling organizations to meet compliance requirements and investigate suspicious actions.

  5. Question 39Multiple Select

    Which Azure DevOps capabilities support data protection and compliance? (Choose all that apply.)

    • AAzure Key Vault integration for secretsCorrect answer
    • BAudit log export to a SIEM toolCorrect answer
    • CEncryption of data in transit and at restCorrect answer
    • DStoring credentials in plain text variable groups

    Why this is the answer

    Key Vault integration protects secrets, audit log export enables monitoring, and encryption protects data. Plain text credentials are a security risk, not a compliance control.

Implement an instrumentation strategy

3 questions in this domain

  1. Question 40Single Choice

    Which Azure Monitor component is used to collect telemetry from an application for diagnostics and usage analysis?

    • AApplication InsightsCorrect answer
    • BAzure Boards
    • CAzure Repos
    • DAzure Pipelines

    Why this is the answer

    Application Insights is an Azure Monitor feature that provides application performance monitoring and telemetry collection, while Azure Boards, Azure Repos, and Azure Pipelines are Azure DevOps services.

  2. Question 41Multiple Select

    Which telemetry data types can be collected by Azure Application Insights? Choose all that apply.

    • AMetricsCorrect answer
    • BDependenciesCorrect answer
    • CExceptionsCorrect answer
    • DUser Stories

    Why this is the answer

    Application Insights accepts telemetry such as requests, dependencies, exceptions, traces, and metrics. User stories are work items in Azure Boards, not telemetry types.

  3. Question 42Interactive

    The Kusto query in the code block is executed in Application Insights. Which telemetry type is being analyzed?

    • ARequestsCorrect answer
    • BTraces
    • CDependencies
    • DCustom Events

    Why this is the answer

    The query filters the requests table by resultCode and operation_Name, which are fields associated with request telemetry in Application Insights.

Frequently asked questions

Everything about the Azure DevOps Engineer Expert question bank and how to use it.