All Microsoft exams

Free AZ-400 practice test: 30 questions with answers

30 original questions for Designing and Implementing Microsoft DevOps Solutions, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.

Free questions
30
Full bank
100 questions

AZ-400 exam guide: topics, cost and format

All 30 AZ-400 questions with answers

The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.

Pipelines and CI/CD (5 questions)

  1. Question 1

    A YAML pipeline must run the same build steps for every branch but deploy only from the main branch. Which pipeline feature controls this?

    1. ARunning the deploy step on individual developers' laptops
    2. BConditions on the deployment stage or job checking the source branch
    3. CManual copy of build artifacts to the production servers
    4. DSeparate copies of the pipeline YAML for every branch
    Show answer and explanation
    Correct answer: B

    Conditions based on the branch let the same pipeline build everywhere and deploy only from main. Copying pipelines, manual artifact copies, and laptop deployments are error-prone and inconsistent.

  2. Question 2

    Which pipeline element defines reusable steps that multiple YAML pipelines can include?

    1. ATemplates
    2. BEnvironment names only
    3. CVariables only
    4. DTriggers only
    Show answer and explanation
    Correct answer: A

    YAML templates let teams define shared jobs, steps, or stages once and reference them across pipelines. Variables hold values, triggers start runs, and environment names identify targets.

  3. Question 3

    A deployment to production must wait for manual approval by a release manager. Which feature provides this in Azure Pipelines?

    1. AA comment in the source code
    2. BEnvironments with approvals and checks
    3. CA scheduled trigger that runs at midnight
    4. DDisabling the production stage
    Show answer and explanation
    Correct answer: B

    Environments with approvals and checks pause a deployment until authorized people approve it. A comment, a midnight trigger, or disabling the stage does not enforce approval.

  4. Question 4

    A build agent pool must be scaled for peak demand without managing virtual machines by hand. Which option fits best?

    1. ARunning builds on the production database server
    2. BMicrosoft-hosted agents
    3. CManual provisioning of physical servers each morning
    4. DA single laptop registered as an agent
    Show answer and explanation
    Correct answer: B

    Microsoft-hosted agents provide managed, fresh build environments on demand without infrastructure work. A laptop cannot scale, manual servers add effort, and running builds on production systems is unsafe.

  5. Question 5

    A team needs builds to use a specific tool version that is not on Microsoft-hosted agents. Which option meets the requirement?

    1. AA self-hosted agent with the required tool installed
    2. BInstall the tool by hand during each run without a policy
    3. CIgnore the version requirement
    4. DEdit Microsoft's hosted image directly
    Show answer and explanation
    Correct answer: A

    Self-hosted agents let teams install and control specific tools and versions. Hosted images cannot be edited by customers, ignoring requirements breaks builds, and ad hoc installs are not reproducible.

Security and compliance (5 questions)

  1. Question 6

    A team wants to detect secrets accidentally committed to a repository. Which control provides this automatically?

    1. AStoring secrets in the README file for easy access
    2. BTurning off repository history tracking on main
    3. CA monthly manual review of the commit message log
    4. DSecret scanning or credential detection in the pipeline
    Show answer and explanation
    Correct answer: D

    Secret scanning detects credentials in code and history and can block or alert on them. Commit message review misses secrets in code, deleting history does not remove exposure, and README storage is insecure.

  2. Question 7

    A compliance team needs proof that every production deployment was approved by an authorized person. Which record best provides this?

    1. AA verbal confirmation given in a team meeting after standup
    2. BA screenshot of the release dashboard taken once
    3. CAn unsigned email that confirms the deployment approval from ops
    4. DPipeline run history with approval records and audit logs
    Show answer and explanation
    Correct answer: D

    Pipeline history with recorded approvals and audit logs gives traceable, verifiable evidence. Verbal confirmation, one-off screenshots, and unsigned emails are not reliable audit evidence.

  3. Question 8

    Which control limits what a pipeline's service connection can do in Azure?

    1. AOwner rights on the whole subscription by default inherited by every resource group inside it
    2. BShared personal credentials of a developer's account reused across pipelines in production
    3. CLeast-privilege role assignments for the service principal or managed identity
    4. DNo permissions at the resource scope, so the service connection cannot read or deploy artifacts
    Show answer and explanation
    Correct answer: C

    Scoped role assignments limit a service connection to the resources it needs. Subscription-wide owner rights, shared personal credentials, and no permissions each create either excessive risk or non-functional pipelines.

  4. Question 9

    Which two controls help secure secrets used by pipelines? (Choose two.)

    1. AUse managed identities or service connections instead of stored passwords where possible
    2. BPrint secrets to the build log for debugging
    3. CStore secrets as plain text variables visible to everyone
    4. DRotate secrets on a schedule
    5. EShare one secret across all projects
    Show answer and explanation
    Correct answer: A, D

    Managed identities and service connections avoid long-lived passwords, and scheduled rotation limits the window of exposure. Logging, plain-text visibility, and sharing one secret widely each increase the risk.

  5. Question 10

    A team must ensure that only approved base images are used in production containers. Which control enforces this?

    1. AA written note in the team wiki listing the approved base images
    2. BAllowing images pulled from public registries without restriction
    3. CTrusting developers to choose the correct base image manually during each code review
    4. DAn admission policy in the cluster that allows only approved image sources
    Show answer and explanation
    Correct answer: D

    Admission policies enforce allowed image sources at deployment time, which blocks unapproved images regardless of developer choice. Wiki notes and trust are not enforced, and open internet images are unapproved.

Source control strategy (5 questions)

  1. Question 11

    A team of 80 developers works in one Azure Repos Git repository and wants a branching strategy that protects the main branch and requires review before merging. Which configuration is most appropriate?

    1. ADisable pull requests on main to speed up merges and skip the reviewer approval step
    2. BStore the code in a shared network folder without version control
    3. CBranch policies on the main branch requiring pull requests and reviewers
    4. DGrant every developer direct push rights to main so commits can skip pull request review
    Show answer and explanation
    Correct answer: C

    Branch policies enforce pull requests, required reviewers, and build validation before changes reach protected branches. Direct pushes, disabled reviews, and shared folders each remove that protection.

  2. Question 12

    A monorepo is growing so large that clones are slow for developers. Which Git feature helps fetch only the files a developer needs?

    1. AGit sparse-checkout or partial clone
    2. BStoring large binaries in the main branch
    3. CDeleting the older commit history
    4. DRenaming the repository each week
    Show answer and explanation
    Correct answer: A

    Sparse-checkout and partial clone reduce the working set and transferred data for large repositories. Deleting history loses traceability, renaming does not affect size, and storing binaries worsens the problem.

  3. Question 13

    Which practice keeps a repository's history readable and makes it easy to revert a single change?

    1. ASmall, focused commits with descriptive messages
    2. BCommitting secrets, removing them later
    3. COne giant commit per month with unrelated work
    4. DRewriting shared branch history frequently
    Show answer and explanation
    Correct answer: A

    Focused commits with clear messages make history readable and let individual changes be reverted safely. Large monthly commits hide the purpose of each change, and rewriting shared history disrupts collaborators.

  4. Question 14

    A team wants to make sure that a pull request builds successfully and passes tests before it can be completed. Which Azure Repos feature enforces this?

    1. AA shared spreadsheet of test results
    2. BA calendar reminder
    3. CBuild validation branch policy
    4. DA wiki page with a checklist only
    Show answer and explanation
    Correct answer: C

    A build validation policy runs a pipeline for each pull request and blocks completion until it passes. Reminders, wiki checklists, and spreadsheets do not enforce the gate.

  5. Question 15

    Which three practices support a healthy trunk-based development workflow? (Choose three.)

    1. AIntegrate changes into the main branch frequently
    2. BUse short-lived feature branches
    3. CRely on automated tests and feature flags for incomplete work
    4. DKeep branches open for months before merging
    5. EMerge changes without any tests
    Show answer and explanation
    Correct answer: A, B, C

    Frequent integration, short-lived branches, and feature flags with automated tests keep trunk-based development fast and safe. Long-lived branches and merges without tests create integration pain and risk.

Instrumentation and monitoring (5 questions)

  1. Question 16

    A team wants alerts when a production service's error rate rises, and dashboards for trends over time. Which Azure service provides these capabilities?

    1. AAzure Artifacts for hosting NuGet and npm packages
    2. BAzure Repos for Git code storage and commits
    3. CAzure Boards for work item tracking and sprints
    4. DAzure Monitor with Application Insights
    Show answer and explanation
    Correct answer: D

    Azure Monitor and Application Insights collect telemetry, provide dashboards, and drive alerts for failures and performance. Boards, Artifacts, and Repos manage work, packages, and code.

  2. Question 17

    A team wants to see a single user request's path across several services to find slow calls. Which telemetry concept is needed?

    1. AA list of installed browsers
    2. BMonthly invoice reports
    3. CDistributed tracing
    4. DOnly server CPU counters
    Show answer and explanation
    Correct answer: C

    Distributed tracing links spans across services for a single request, which shows where latency occurs. CPU counters alone do not follow a request, and invoices and browser lists are unrelated.

  3. Question 18

    A team wants to track how long each deployment takes and how often it fails, as an indicator of delivery health. Which set of metrics is commonly used?

    1. ANumber of coffee breaks taken per day by each engineer on the team
    2. BLength of the team's official display name in characters
    3. CCount of unused browser tabs left open on the developer's laptop each morning
    4. DDORA metrics such as deployment frequency and change failure rate
    Show answer and explanation
    Correct answer: D

    DORA metrics measure delivery performance, including deployment frequency, lead time, change failure rate, and recovery time. The other measures do not describe delivery health.

  4. Question 19

    A team wants to be alerted when a production container's CPU usage stays high for 15 minutes. Which Azure feature sends that alert?

    1. AA change to the team's chat wallpaper and emoji theme settings on each device
    2. BAn Azure Monitor metric alert rule with a notification action group
    3. CA manual check of the container metrics every single week by the on-call engineer
    4. DA printed chart on a desk showing last month's average CPU and memory usage
    Show answer and explanation
    Correct answer: B

    Metric alert rules evaluate conditions over a time window and trigger action groups to notify people or systems. Manual or printed checks are too slow, and wallpapers are unrelated.

  5. Question 20

    A team uses Application Insights and sees that one dependency call is slow. Which feature helps find the specific slow operation within a request?

    1. ADependency and transaction details in end-to-end transaction views
    2. BThe number of active users in the Azure AD directory
    3. CThe application's version number and release build date
    4. DThe name of the Git repository hosting the source code files
    Show answer and explanation
    Correct answer: A

    End-to-end transaction views show dependencies and their timing within a request, which pinpoints slow operations. Version numbers, user counts, and repository names do not reveal where time is spent.

Dependency and package management (5 questions)

  1. Question 21

    A team wants to store internal NuGet and npm packages and control which public packages can be used. Which Azure DevOps service fits best?

    1. AAzure Test Plans with manual tests
    2. BAzure Artifacts with upstream sources
    3. CAzure Monitor with Log Analytics
    4. DAzure Boards for tracking work items
    Show answer and explanation
    Correct answer: B

    Azure Artifacts hosts feeds for internal packages and can use upstream sources to control access to public packages. Boards tracks work, Test Plans manages testing, and Monitor observes running systems.

  2. Question 22

    Which practice reduces the risk of a dependency update breaking production unexpectedly?

    1. AAlways use the newest version of every package without testing
    2. BPin versions and test updates in a pipeline before promotion
    3. CRemove the lock file
    4. DIgnore vulnerability alerts
    Show answer and explanation
    Correct answer: B

    Pinned versions and pipeline tests make dependency changes deliberate and verified. Automatic newest-version use, removed lock files, and ignored alerts each expose production to unplanned change.

  3. Question 23

    A dependency scan reports a critical vulnerability in a library used by a service. What is the best immediate action?

    1. ASuppress the finding in the scan dashboard so it is hidden from the rest of the team
    2. BDefer reviewing the finding for up to a year, until the next quarterly security audit cycle
    3. CDisable the dependency scan task in the pipeline to clear the report for this branch
    4. DAssess exposure, update or mitigate the library, and rerun the pipeline checks
    Show answer and explanation
    Correct answer: D

    Assessing exposure, remediating or mitigating, and verifying through the pipeline addresses the risk. Disabling scans, hiding findings, and delaying review leave the vulnerability active.

  4. Question 24

    Which practice keeps a build reproducible when package versions are not pinned in source?

    1. AInstall packages from unknown sources
    2. BUse the newest packages at every build without recording them
    3. CCommit a lock file that records exact dependency versions
    4. DDelete the cache before every build without a lock file
    Show answer and explanation
    Correct answer: C

    Lock files record exact resolved versions so builds use the same dependencies each time. Using whatever is newest, deleting caches without locks, and unknown sources make builds non-reproducible or unsafe.

  5. Question 25

    A team wants to speed up pipeline runs by reusing downloaded packages between builds. Which feature provides this?

    1. ADeleting the cache after every run to keep builds clean
    2. BDisabling dependency restore steps in the build definition
    3. CPipeline caching keyed on the dependency lock file
    4. DStoring downloaded packages inside the source repository
    Show answer and explanation
    Correct answer: C

    Caching restores previously downloaded packages when the dependency key matches, which shortens runs. Deleting caches, disabling restore, and storing packages in source do not speed up builds reliably.

Processes and communications (5 questions)

  1. Question 26

    A team wants work items to move through stages such as new, active, and closed, with a clear view of progress. Which Azure DevOps service supports this?

    1. AAzure Artifacts
    2. BAzure Load Testing
    3. CAzure Key Vault
    4. DAzure Boards
    Show answer and explanation
    Correct answer: D

    Azure Boards tracks work items, boards, and states so teams can manage backlogs and progress. Artifacts stores packages, Load Testing measures performance, and Key Vault stores secrets.

  2. Question 27

    A team wants to track which work items were included in each release. Which Azure DevOps capability provides this traceability?

    1. AIgnoring work items in releases
    2. BWriting the release notes from memory later
    3. CKeeping a paper list of tickets
    4. DLinking work items to builds and releases
    Show answer and explanation
    Correct answer: D

    Linking work items to builds and releases gives traceability from requirements through delivery. Memory, paper lists, and ignoring items cannot reliably support release traceability.

  3. Question 28

    A team wants a shared dashboard that shows open bugs by priority for its sprint. Which Azure DevOps feature provides it?

    1. ADashboards with query-based widgets
    2. BA screenshot in the wiki once a sprint
    3. CA hand-drawn chart
    4. DA spreadsheet updated monthly
    Show answer and explanation
    Correct answer: A

    Dashboards with query-based widgets update live from work item queries. A monthly spreadsheet, hand-drawn chart, or sprint screenshot are not live.

  4. Question 29

    A team wants to make sure that every change to a production system has a recorded reason and reviewer. Which combination of practices does this?

    1. AChanges made without tickets or records to save review time
    2. BDirect commits to main by the most senior engineer without peer review
    3. CPull requests linked to work items with required reviewers
    4. DVerbal approval given in the hallway by a manager
    Show answer and explanation
    Correct answer: C

    Pull requests linked to work items with required reviewers record the reason and the approval for each change. Direct commits, verbal approvals, and unrecorded changes lack that traceability.

  5. Question 30

    A team wants to measure how long a work item takes from creation to completion. Which Azure Boards capability helps with this?

    1. AChanging the board colour daily
    2. BCycle time and lead time analytics
    3. CDeleting completed items
    4. DCounting the number of emojis in comments
    Show answer and explanation
    Correct answer: B

    Cycle time and lead time analytics show how long work takes to flow through the process, which supports improvement. Emoji counts, board colours, and deleting items do not measure flow.

Want more AZ-400 questions?

The full bank has 100 questions with answers and explanations, as a PDF, an online practice exam, or both.

Full question bank · 100 questions
$89$124

Both formats together. The best value.

Instant access after payment, with 90 days of updates. Checkout is on our store, AIExamCerts.