Microsoft · Free Practice Questions · Last reviewed May 2026
36real exam-style questions organised by domain, each with the correct answer highlighted and a plain-English explanation of why it's right — and why the others are wrong.
13% of exam · 6 sample questions below
A team uses Azure Boards and wants to ensure that work items moved to the 'Done' state require a completed code review. What should they configure?
Add a work item rule in the process template to require a code review for the 'Done' transition.
A process template rule is the correct mechanism in Azure Boards because rules can enforce conditions on state transitions, such as requiring a custom 'Code Review' field to be completed before a work item is allowed to move to 'Done'.
Modify the work item type definition to add a custom field for code review status.
Use a tag to mark work items as code-reviewed before moving to 'Done'.
Configure branch policies in Azure Repos to require pull request approvals.
During a sprint review, stakeholders complain that they don't receive notifications about completed work items. The team uses Azure Boards with a custom notification subscription. What is the most likely cause?
Email notifications are disabled at the organization level.
The subscription is set to deliver only to the team members.
The subscription's 'Deliver to' filter excludes stakeholders.
The 'Deliver to' filter in an Azure DevOps notification subscription controls exactly which roles, groups, or individuals receive the alert. If stakeholders are omitted from that filter, they will not get any notifications from this subscription even though the subscription itself is active and functioning, which directly explains the symptom.
The subscription was automatically disabled after the first notification.
A multinational company uses Azure DevOps with a single project. The project has multiple teams in different time zones. They want to customize the process to reflect different working days for each team. What is the recommended approach?
Create a custom process for each time zone and assign teams accordingly.
Use the same process but create separate areas for each team, then configure working days per area path.
Use the same process and configure working days in the team settings for each team.
Azure DevOps allows each team in a shared project to have its own working days and non-working days under Team Settings, so teams in different time zones can use the same process while reflecting local calendars. This per-team calendar feeds backlog, sprint, and capacity views, making it the correct approach for a multinational company using a single project.
Use the same process and configure capacity planning for each team to account for time off.
A team uses Azure Repos with a Git branching strategy that includes feature branches. They want to ensure that all feature branches are deleted automatically after the pull request is completed. What should they do?
Enable 'Automatically delete source branch' in the branch policy.
This deletes the source branch after the PR is completed.
Enable 'Create a merge commit' option in the branch policy.
Configure branch retention policy in the pipeline to delete branches after build.
Create a work item to remind developers to delete branches after merge.
An organization uses Azure DevOps and wants to implement a change management process where all changes to the main branch require approval from a change advisory board (CAB). The CAB members are not part of the development team. How should they configure this?
Set branch permissions to restrict push to main and only allow CAB to approve via manual process.
Create a new branch policy on main that requires a minimum number of reviewers from a separate CAB group.
A branch policy on main can require a minimum number of reviewers from a specific Azure DevOps group, such as a separate CAB. This ensures automated enforcement of the approval requirement, so pull requests cannot be completed without the mandated CAB reviews.
Use a service hook to notify CAB when a PR is created, and rely on manual approval.
Add the CAB as members of the development team and require team review.
Which TWO actions help improve communication and collaboration in a distributed Azure DevOps team?
Maintain a shared wiki with project documentation and decisions.
Maintaining a shared wiki centralizes project documentation and decisions in a single source of truth, with versioning and searchability that reduce redundant questions and ensure all team members, regardless of location or role, can access consistent, up-to-date information.
Use multiple chat channels for each topic to organize discussions.
Use long email threads for decision-making to ensure full documentation.
Schedule daily stand-up meetings at a time that works for all time zones.
Scheduling daily stand-up meetings at a time that accommodates all time zones maximizes participation and ensures the team maintains a consistent sync cadence, which is critical for quickly surfacing blockers and aligning on priorities across distributed teams.
Avoid using pull request comments to reduce noise.
Want more Configure processes and communications practice?
Practice this domain7% of exam · 6 sample questions below
A team uses a monorepo with multiple projects in one Git repository. They want to enforce that each commit message must reference a work item from Azure Boards. Which branch policy should they configure?
Automatically include work items in pull request descriptions
Require a work item linking policy in branch policies
Configure a minimum number of reviewers policy
Use a build validation policy to check commit messages
A build validation policy runs a configured pipeline (e.g., a script that greps commit messages) and can fail the build if a message lacks a work item ID, but this is an indirect, custom workaround. It does not natively enforce work item linking in the pull request metadata, is prone to bypass via malformed commit messages, and is not the designated Azure DevOps policy for this requirement.
An organization has multiple Git repositories. Developers often forget to update the repository README file after making changes. What is the most effective way to ensure the README is always up-to-date?
Apply a label to PRs that touch certain files and require review
Add a task in the CI pipeline that checks if the README was modified
Adding a CI pipeline task that checks if the README was modified automatically verifies that any code changes are accompanied by a corresponding README update, ensuring the README remains accurate.
Use a repository template with a mandatory README file structure
Require a pull request comment that confirms README update
A development team uses a forking workflow in Azure Repos. They want to ensure that only specific users can create forks of the main repository. How can they achieve this?
Use branch security to restrict who can create forks
Set branch policies on the main branch to prevent forks
Configure the repository to disable forks globally
Remove the 'Create Fork' permission from all users except the required group
The 'Create Fork' permission is a repository-level security permission in Azure Repos, stored separately from branch permissions. To allow only a specific group to create forks, you remove the 'Create Fork' permission from all other users and groups (for example, Contributors and Readers) in the repository's Security page, then explicitly set it to 'Allow' for the required group. This is the only per-repository mechanism that enforces the requirement precisely, since it leaves fork creation available to the approved group while denying everyone else.
A team uses Git for source control. They want to automatically squash all commits in a feature branch into a single commit when merging to the main branch. Which merge type should they use?
Rebase and fast-forward
Squash commit
Squash commit is correct because it merges the feature branch by combining all of its changes into a single new commit on the target branch. This collapses the entire commit history of the feature into one commit, exactly matching the requirement to combine all changes into a single commit.
Merge commit (no fast-forward)
Semi-linear merge
A company has a policy that all code changes must be reviewed by at least two people. However, for urgent bug fixes, they want to allow a single reviewer. How should they configure the branch policy?
Set minimum number of reviewers to 1 and require a separate approval from a manager
Set minimum number of reviewers to 2 and allow resetting code review votes on new pushes
Configure a build validation policy that checks number of approvals
Set minimum number of reviewers to 2, but allow policy override for urgent fixes
This allows the two-reviewer policy to be applied normally, while still permitting urgent fixes to be merged without two approvals; the override requires a justification and is logged for audit, balancing policy enforcement with operational flexibility.
A team uses Git-LFS to store large binary files. They observe that cloning the repository takes a long time because Git-LFS files are downloaded. How can they improve clone performance?
Use a shallow clone with depth 1
Use the --filter=blob:none option when cloning
This partial clone defers downloading LFS blobs until they are accessed.
Use sparse checkout to limit files in working directory
Configure git lfs prune to run automatically
Want more Design and implement source control practice?
Practice this domain13% of exam · 6 sample questions below
A company uses Azure DevOps for CI/CD. The security team requires that all pipeline runs must use a specific service connection (ServiceConnection-Prod) that has been approved for production deployments. However, developers are accidentally using unapproved connections. You need to enforce that only the approved service connection can be used in any pipeline that deploys to the production environment. What should you do?
Define a required template for all pipelines that includes the service connection, and instruct developers to use it.
Set up a manual approval gate on the production environment stage in the pipeline.
Configure a branch policy on the main branch to require a successful build before merging.
Create an Azure Pipeline decorator that validates the service connection used in each task and fails the pipeline if it is not the approved one.
A pipeline decorator is an extension-based mechanism that injects a custom task into every pipeline run at the specified point (pre-job, post-job, or around a task). By defining a post-task decorator, you can read the inputs of each executed task—such as the `connectedServiceName` or `azureSubscription` input—and compare the referenced service connection to the organization's approved list. If the connection is not approved, the decorator can set the task result to `Failed` and stop the pipeline, providing a hard enforcement that ordinary YAML conventions cannot achieve. This works for any pipeline that uses the task, regardless of whether the author referenced a shared template.
Your organization uses Azure DevOps and Azure Key Vault to manage secrets. You have a pipeline that deploys a web app to Azure App Service. The pipeline uses a variable group linked to Key Vault to retrieve the database connection string. Recently, the build started failing with the error: 'Access to Key Vault is denied. Please ensure the service connection has Get and List permissions on secrets.' The service connection uses a service principal. You have verified that the service principal has the correct Key Vault access policy with Get and List permissions. What is the most likely cause of the failure?
The service connection is configured to use the wrong Azure subscription.
The secret name in the variable group does not match the secret name in Key Vault.
The service principal used by the service connection does not have Contributor role on the Key Vault.
The build service identity does not have Get and List permissions on the Key Vault secrets.
The build service identity (project collection or project level) must be granted access to Key Vault for variable group resolution.
A company uses Azure DevOps and needs to ensure that all pipelines use approved YAML templates from a central repository. The security team wants to prevent developers from referencing unapproved templates. What is the best way to enforce this?
Create a branch policy on the repository that requires all pull requests to be approved by security team members.
Configure a variable group with the approved template repository and require it in all pipelines.
Use a pipeline decorator to check the template origin and fail the pipeline if unapproved.
A custom pipeline decorator could technically inspect template origins and fail the build, but it requires you to write, publish, and maintain a private extension, which is complex and error-prone. The built-in 'Required template' repository setting provides the same enforcement more simply and reliably without custom code.
Set the 'Required template' repository setting in the Azure DevOps project to the approved central repository.
You are designing a compliance strategy for Azure DevOps pipelines that deploy to production. The company policy requires that all production deployments must be reviewed by a security lead. Additionally, the deployment must use a specific release pipeline that has been pre-approved. How should you implement this?
Create a branch policy that requires the security lead to approve the pull request before merging.
Define a 'production' environment in Azure DevOps and configure an approval check that requires the security lead. Have the pipeline deploy to that environment.
Environment approval checks in YAML pipelines create a standardized, auditable manual gate before any deployment to the production environment. This integrates directly with pipeline runs, ensures the security lead explicitly approves each release, and provides full traceability, fulfilling the compliance requirement.
Use a Classic release pipeline with a pre-deployment approval gate for the production stage.
Store the approved pipeline definition in a variable group and reference it in all pipelines.
A financial services company uses Azure DevOps and requires that all secrets (e.g., API keys, connection strings) be stored in Azure Key Vault. They have a pipeline that runs automated tests and deploys to staging. The pipeline uses a variable group linked to Key Vault to retrieve secrets. Recently, the pipeline failed with the error: 'Secret 'DbPassword' not found in Key Vault 'kv-prod'. Ensure the secret exists and the service principal has List permission.' The secret exists in the vault. What is the most likely cause?
The variable group is linked to the wrong Key Vault instance.
The variable name in the variable group does not exactly match the secret name in Key Vault (case-sensitive).
Azure DevOps maps variable names to secret names, and the match is case-sensitive.
The service principal does not have Get permission on the secret.
The Key Vault is in a different Azure region than the Azure DevOps organization.
Your organization uses Azure DevOps and Azure Policy to enforce compliance. You need to ensure that all Azure resources deployed by Azure DevOps pipelines have specific tags (e.g., CostCenter and Environment) applied. Which TWO approaches can achieve this? (Choose TWO.)
Configure the service connection to only allow deployments with tags.
Create an Azure Policy with the 'audit' effect to report non-compliant resources.
Create an Azure Policy with the 'deny' effect that requires the tags to be present at resource creation.
Deny policy blocks deployment of non-compliant resources.
Add a pipeline task after resource creation that applies the required tags using Azure CLI or PowerShell.
This remediates missing tags post-deployment.
Configure a branch policy on the main branch to require tag verification in pull requests.
Want more Develop a security and compliance plan practice?
Practice this domain7% of exam · 6 sample questions below
You are configuring Application Insights for a .NET Core web application deployed to Azure App Service. The application must capture telemetry for all HTTP requests, exceptions, and dependency calls with minimal code changes. What should you do?
Enable the Application Insights site extension in the App Service 'Application Insights' blade.
The Application Insights site extension in the App Service 'Application Insights' blade is the correct choice because it attaches the Application Insights agent directly to the App Service runtime, automatically collecting server-side telemetry such as requests, dependencies, exceptions, and performance counters without requiring any code changes, recompilation, or redeployment.
Configure diagnostics logging in the App Service and stream logs to Application Insights.
Install the Microsoft.ApplicationInsights.AspNetCore NuGet package and add services.AddApplicationInsightsTelemetry() in Startup.cs.
Add the Application Insights JavaScript SDK to each page.
Your team uses Azure DevOps for CI/CD. You need to ensure that every build publishes telemetry to Application Insights, including build duration, test pass rate, and deployment frequency. Which approach should you use?
Call the Azure DevOps REST API from a custom script in the pipeline to capture telemetry.
Run the Azure DevOps CLI command 'az devops telemetry publish' in a build task.
Use the built-in 'Pipeline Telemetry' dashboard in Azure DevOps.
Use the Azure DevOps Analytics OData endpoint to query pipeline telemetry and send to Application Insights via a release task.
The Analytics Service exposes pipeline run, test, and work item data as OData entities, allowing you to run rich queries. You can then use a release pipeline task (e.g., a PowerShell script) to call the OData endpoint, transform the results, and send them to Application Insights using its TrackEvent or TrackMetric APIs for custom monitoring and alerting. This is the recommended integration path.
You are designing a centralized logging strategy for multiple microservices hosted in Azure Kubernetes Service (AKS). Each microservice writes logs in JSON format to stdout/stderr. The operations team needs to query logs across all services and correlate them with application performance metrics. Which solution provides the best integration?
Configure AKS to send logs to Azure Blob Storage and use Azure Storage Analytics for querying.
Enable Container Insights in Azure Monitor to collect stdout/stderr logs and metrics into a Log Analytics workspace.
Container Insights is the native Azure Monitor solution for AKS: it deploys a Log Analytics agent as a DaemonSet to collect stdout/stderr logs, performance metrics, and container inventory into a Log Analytics workspace. This enables rich Kusto Query Language (KQL) queries, alerting, and correlation with other Azure Monitor data, making it the correct centralized logging approach for AKS workloads.
Stream logs to Azure Event Hubs and then to Azure Data Explorer for analysis.
Deploy the Application Insights agent as a DaemonSet in AKS and send logs directly to Application Insights.
You have an Azure DevOps pipeline that deploys a web app to Azure App Service. You want to capture deployment frequency and change failure rate as metrics in Application Insights. Which built-in analytics view should you use?
Deployment Frequency
Application Dashboard
The Application Dashboard is a built-in analytics view in Application Insights that can be customized with metric tiles to display deployment frequency and change failure rate.
Time to Restore Service
Azure DevOps Pipeline Telemetry
You are troubleshooting an intermittent performance issue in a web application. Application Insights shows a high number of failed dependency calls to Azure SQL Database. The errors are SqlException with error code -2 (timeout). What is the most likely cause and recommended fix?
The application is exhausting the connection pool; increase Max Pool Size in the connection string.
Connection pool exhaustion occurs when the application requests more connections than the configured Max Pool Size, forcing new requests to wait for a free connection until the connection timeout threshold is reached, which manifests as intermittent timeouts under load; increasing Max Pool Size or ensuring connections are properly disposed can resolve this.
The SQL Server firewall is blocking the application IP; add a firewall rule.
The database is experiencing deadlocks; enable read committed snapshot isolation.
The database DTU limit is being exceeded; scale up the service tier.
Which TWO metrics should you monitor to evaluate the reliability of a web application according to the DORA metrics?
Lead Time for Changes
Change Failure Rate
Change Failure Rate is the percentage of deployments that cause a failure in production, such as a service impairment or rollback. It is a core DORA reliability metric because it directly quantifies how often changes disrupt service, making it essential for evaluating system stability.
Mean Time to Restore (MTTR)
Mean Time to Restore (MTTR) measures the average time it takes to recover from a production failure, from detection to full service restoration. It is a key reliability metric because it indicates how quickly a team can respond to incidents and minimize downtime, complementing failure rate by assessing recovery effectiveness.
CPU Usage
Deployment Frequency
Want more Implement an instrumentation strategy practice?
Practice this domain54% of exam · 6 sample questions below
A team uses Azure Pipelines to build a .NET Core application. The build pipeline runs successfully, but the release pipeline fails when deploying to Azure App Service with the error: 'ERROR_FILE_IN_USE'. What is the most likely cause?
The deployment slot is not configured correctly.
The 'Take App Offline' setting is not enabled in the deployment task.
The 'Take App Offline' setting instructs the Web App to place an app_offline.htm file in the site root, which gracefully shuts down the app and releases any locks on its assemblies and files. Without this, the running process holds the DLLs, causing 'file in use' errors when the pipeline tries to overwrite them.
The Azure App Service plan is not scaled appropriately.
The build configuration is set to Release instead of Debug.
A development team is designing a build pipeline for a microservices application. They want to ensure that each service is built and tested independently, but they also need to run integration tests that span multiple services. What is the recommended approach?
Use a single release pipeline that triggers manual deployment for each service.
Create a single build pipeline that builds all services together to ensure consistency.
Create individual build pipelines for each service, and a separate release pipeline that deploys all services to an integration environment for testing.
Individual build pipelines per service enable each team to build, version, and test independently, while a dedicated release pipeline that deploys all services to an integration environment validates cross-service contracts and interactions in a realistic environment, combining independence with necessary integration assurance.
Build each service separately, but skip integration tests to avoid complexity.
A company uses Azure Pipelines with YAML-based pipelines stored in a Git repository. The pipeline triggers on every push to the main branch, but the team wants to reduce unnecessary builds when only documentation files are changed. What is the best way to achieve this?
Use path filters in the trigger section to exclude 'docs/*' and '*.md' files.
Path filters in the trigger section use `trigger.paths.exclude` to prevent pipeline execution when only files under `docs/*` or matching `*.md` are changed; any other changed file will still trigger the pipeline, making this the correct, event-driven way to avoid documentation commits.
Configure branch policy to require a pull request for documentation changes.
Add a 'condition' to the pipeline that checks if changed files are documentation.
Disable CI trigger and rely on scheduled builds.
A team is implementing a release pipeline for a Node.js application. They want to run integration tests against a temporary environment that is destroyed after the tests complete. Which strategy should they use?
Use a separate release pipeline that deploys to a production environment for testing.
Use a single release pipeline that deploys to a staging slot and runs tests on the slot.
Run integration tests in the build pipeline using a mock environment.
Use a release pipeline that deploys to a new Azure App Service instance, runs tests, and then removes the instance.
Using a release pipeline that deploys to a new Azure App Service instance, runs tests, and then removes the instance is correct because it provides an ephemeral, isolated environment that closely mirrors production, enabling realistic integration validation and automatic teardown, which avoids lingering state and reduces cost.
Which TWO actions should be taken to secure secrets in Azure Pipelines? (Choose two.)
Use secret variables with the 'secret' input type to mask them in logs.
In Azure Pipelines, defining variables with the `secret` input type (e.g., via the pipeline UI or YAML `${{ variables.secret }}`) ensures they are encrypted at rest and automatically masked in all pipeline logs, preventing accidental exposure. This is a fundamental practice for handling sensitive data in CI/CD, as it protects against log leakage while still allowing tasks to reference the variable securely.
Use a variable group without Key Vault integration for easier management.
Store secrets directly in the YAML pipeline file.
Store secrets in a variable group linked to Azure Key Vault.
By linking a variable group to Azure Key Vault, the pipeline retrieves secret values at runtime via a securely authenticated connection, ensuring secrets are never stored in plaintext within the pipeline definition or logs. This approach leverages Key Vault's access policies and audit capabilities, providing a centralized, secure way to manage and rotate secrets across pipelines.
Disable CI triggers to reduce exposure.
You are reviewing an Azure Policy definition applied to an Azure DevOps project. The project has a build pipeline that deploys to production. What is the effect of this policy on the build pipeline?
The policy blocks the pipeline from running if fewer than two reviewers approve.
The policy requires two reviewers and blocks the pipeline if not met.
The policy audits the pipeline but does not enforce any mandatory reviewers.
The audit effect logs compliance without blocking.
The policy does not apply to build pipelines because the field type is teamProjects.
Want more Design and implement build and release pipelines practice?
Practice this domain6% of exam · 6 sample questions below
Your team uses a monorepo in Azure Repos with multiple feature branches. You notice that merge conflicts frequently occur because developers are working on the same files. You want to reduce conflicts and improve collaboration. Which branching strategy should you recommend?
Use release branches for each deployment and cherry-pick commits from main.
Use trunk-based development with feature flags to merge small, frequent changes.
Trunk-based development with feature flags enables developers to merge small, frequent changes directly into the trunk behind a flag, keeping branches short-lived and integration burden low, which minimizes merge conflicts and supports continuous integration and delivery.
Use a single main branch and require all changes to be committed directly.
Use GitFlow with separate develop and release branches.
Your company is migrating from TFVC to Git in Azure Repos. The repository contains a large number of binary files (e.g., .dll, .exe) that are frequently updated. You need to minimize repository size and clone time. What should you include in your migration plan?
Perform a shallow clone of the last commit only.
Use Git LFS to track binary files.
Git LFS stores binary files in a separate remote store and replaces them in Git with small text pointers, so cloning fetches only the pointers and downloads actual binaries on demand (via `git lfs fetch` or by checking out the working tree). This keeps the .git directory and clone time small, and Azure Repos fully supports Git LFS for repos, making it the correct solution for large binary files.
Use sparse checkout to exclude binary files from the working tree.
Use TFVC to Git converter with default settings.
You have a GitHub repository with a GitHub Actions workflow that builds a .NET application. The workflow should only run when changes are pushed to the main branch, but it currently runs on every push to any branch. How should you fix the workflow trigger?
Add 'on: push: branch: [main]' to the workflow.
Add 'on: push: paths: [main]' to the workflow.
Add 'on: pull_request: branches: [main]' to the workflow.
Add 'on: push: branches: [main]' to the workflow.
This correctly configures the 'push' trigger with the 'branches' filter set to 'main', using the proper plural key. As a result, the workflow will execute only when commits are pushed directly to the 'main' branch, ignoring pushes to other branches.
You see the above git log output. The team has a policy requiring linear history on the main branch. Which command should be used next time to integrate the feature branch?
git merge --squash feature/login
git cherry-pick f4e5d6c a7b8c9d
git merge --no-ff feature/login
git rebase main feature/login then git merge --ff-only
Rebase creates linear history; fast-forward merge preserves it.
Your team uses GitHub and wants to enforce that all commits to the main branch are signed with a GPG key. Which branch protection rule should you configure?
Require pull request reviews before merging.
Require status checks to pass before merging.
Require linear history.
Require signed commits.
Requiring signed commits is a branch protection rule that rejects any commit not cryptographically signed with a verified GPG or S/MIME key, authenticating the committer and ensuring content integrity. This directly enforces that every commit must be signed, exactly as the requirement demands.
Your Azure DevOps project contains a Git repository with multiple branches. You need to ensure that code reviews are mandatory for all pull requests targeting the 'release' branch. Additionally, the build pipeline must pass before merging. How should you configure branch policies?
Enable 'Build validation' only.
Enable 'Require a minimum number of reviewers' only.
Enable 'Require a minimum number of reviewers' and 'Build validation'.
Combining 'Require a minimum number of reviewers' and 'Build validation' enforces both peer review and a successful build pipeline. This ensures that changes are approved by the required reviewers and meet the build quality gate before merging, delivering comprehensive branch protection.
Enable 'Require a minimum number of reviewers' and 'Comment resolution'.
Want more Design and implement a source control strategy practice?
Practice this domainThe AZ-400 exam has 50 questions and must be completed in 120 minutes. The passing score is 700/1000.
Scenario-based questions covering exam objectives with detailed answer explanations.
The exam covers 6 domains: Configure processes and communications, Design and implement source control, Develop a security and compliance plan, Implement an instrumentation strategy, Design and implement build and release pipelines, Design and implement a source control strategy. Questions are weighted by domain — higher-weight domains appear more on your actual exam.
No. These are original exam-style practice questions written against the official Microsoft AZ-400 exam objectives. They are not copied from the real exam. Courseiva focuses on genuine understanding, not memorisation of braindumps.
Courseiva tracks your accuracy per domain and routes you toward weak areas automatically. Free, no account required.