Microsoft Certification

AZ-400 — Designing and Implementing Microsoft DevOps Solutions Study Guide

59 practice questions with correct answers and detailed explanations. Use this guide to review concepts before taking the practice exam.

▶ Take Practice Exam 59 questions  ·  Free  ·  No registration

About the AZ-400 Exam

The Microsoft Designing and Implementing Microsoft DevOps Solutions (AZ-400) certification validates professional expertise in Microsoft technologies. This study guide covers all 59 practice questions from our AZ-400 practice test, complete with correct answers and explanations to help you understand each concept thoroughly.

Review each question and explanation below, then test yourself with the full interactive practice exam to measure your readiness.

59 Practice Questions & Answers

Q1 Medium

Your organization uses Azure Repos for version control. You need to implement a strategy to prevent direct commits to the main branch. Which approach should you use?

  • A Delete the main branch and recreate it weekly
  • B Configure branch policies with pull request requirements ✓ Correct
  • C Remove all developer accounts from the repository
  • D Enable audit logging to track all commits
Explanation

Branch policies in Azure Repos enforce code review requirements and build validation before merging to main, preventing direct commits effectively.

Q2 Medium

You are designing a multi-stage release pipeline using Azure Pipelines. What is the primary purpose of using deployment gates?

  • A To pause deployments for manual approval and validation before proceeding to the next stage ✓ Correct
  • B To increase the number of agents available for parallel builds
  • C To encrypt all artifacts stored in the pipeline
  • D To automatically rollback failed deployments within 5 minutes
Explanation

Deployment gates control the flow of releases by pausing deployments at specified points to allow for manual approvals, automated checks, or other validations before progression.

Q3 Hard

Your team is implementing Infrastructure as Code using Azure Resource Manager templates. A developer accidentally commits a template containing a hardcoded storage account key. What should be your immediate remediation step?

  • A Delete the entire Azure Resource Manager template file from history
  • B Rotate the storage account key immediately and audit access logs ✓ Correct
  • C Archive the repository and create a new one
  • D Request the developer rewrite the template without reviewing the commit
Explanation

Immediately rotating the compromised credential is the critical first step to prevent unauthorized access, followed by auditing to determine if the key was misused.

Q4 Medium

You need to implement a container registry scanning solution in your CI/CD pipeline. Which Azure service should be integrated to scan container images for vulnerabilities automatically?

  • A Azure Key Vault with secret rotation policies
  • B Azure Virtual Machine Scale Sets
  • C Azure Service Bus for image distribution
  • D Azure Container Registry with Defender for Registries ✓ Correct
Explanation

Azure Defender for Registries provides automated vulnerability scanning of container images stored in Azure Container Registry during build and deployment processes.

Q5 Medium

Your organization wants to measure deployment frequency and lead time for changes as part of DORA metrics. Which two metrics are these classified as?

  • A Velocity and efficiency metrics, which measure how quickly changes reach production ✓ Correct
  • B Cost optimization and resource utilization metrics
  • C Reliability and stability indicators
  • D Security and compliance metrics
Explanation

DORA metrics include deployment frequency and lead time as velocity/efficiency measures that indicate how fast teams can deliver changes to production.

Q6 Medium

You are configuring a self-hosted Azure Pipelines agent behind a corporate firewall. The agent cannot reach Azure Services. What is the most likely configuration issue?

  • A Outbound network connectivity is blocked or misconfigured for the required service endpoints ✓ Correct
  • B The agent machine clock is not synchronized with Azure time servers
  • C The agent requires PAT token with Build Read & Execute permissions
  • D The agent must be registered using a service principal instead of a user account
Explanation

Self-hosted agents behind firewalls require outbound network access to Azure services; firewall rules blocking required endpoints will prevent agent connectivity to Azure.

Q7 Medium

Your team implements a blue-green deployment strategy for a critical application. What is the primary advantage of this approach?

  • A It eliminates the need for staging environments entirely
  • B It automatically scales infrastructure based on real-time user demand metrics
  • C It reduces the number of virtual machines required for production by 50%
  • D It allows instant rollback to the previous version with minimal downtime by switching traffic between two identical production environments ✓ Correct
Explanation

Blue-green deployments maintain two identical production environments, allowing rapid traffic switching for instant rollbacks if issues occur in the new version.

Q8 Easy

You need to ensure that sensitive configuration values are not exposed in your Git repository. Which approach is recommended?

  • A Store sensitive values in Azure Key Vault and reference them in your pipeline ✓ Correct
  • B Commit sensitive values to a separate private branch only developers can access
  • C Use Base64 encoding to obscure sensitive values in configuration files
  • D Add sensitive files to .gitignore after the first commit
Explanation

Azure Key Vault provides secure, centralized storage for secrets with access control and audit logging, preventing sensitive values from being stored in repositories.

Q9 Hard

Your organization is adopting GitOps practices using Azure DevOps. How should infrastructure and application configurations be managed in this approach?

  • A Use separate Git branches for each environment and manually deploy changes using release pipelines only
  • B Maintain configurations in Azure Resource Manager templates that are manually deployed on demand
  • C Store all configurations in Git repositories as the single source of truth and use automated reconciliation to match the live environment state ✓ Correct
  • D Store configurations in Azure DevOps artifacts and deploy them using scheduled batch jobs
Explanation

GitOps treats Git repositories as the single source of truth, using continuous reconciliation operators to automatically synchronize the live environment with Git state.

Q10 Medium

You are implementing a security scanning step in your CI/CD pipeline using Microsoft Security DevOps. Which types of security vulnerabilities can this tool detect?

  • A Only network-based attacks and DDoS patterns
  • B Source code vulnerabilities, dependency issues, and infrastructure misconfigurations ✓ Correct
  • C Exclusively database injection attacks and SQL syntax errors
  • D Only user authentication bypass vulnerabilities
Explanation

Microsoft Security DevOps scans source code, dependencies, and infrastructure configurations for security vulnerabilities and compliance issues across the development pipeline.

Q11 Medium

Your team uses Azure Artifacts to host NuGet packages. You need to implement feed permissions so only authorized teams can publish packages. What should you configure?

  • A Implement IP whitelisting rules at the network level
  • B Store all packages in a single public feed with encrypted file names
  • C Use Azure Storage access keys to control who can access the artifact feed
  • D Create separate feeds for each team and assign contributors with package publishing permissions ✓ Correct
Explanation

Azure Artifacts feeds support granular permission models where different teams can have separate feeds with specific contributor permissions for package publishing.

Q12 Medium

You need to implement test automation for UI testing in your CI/CD pipeline. Which approach provides the best integration with Azure Pipelines?

  • A Use only unit tests and skip UI testing entirely
  • B Use Selenium with parallel execution configured through Azure Pipelines multi-job strategy ✓ Correct
  • C Execute UI tests on local developer machines only before committing code
  • D Manually run tests after deployment and manually log results to Azure DevOps
Explanation

Selenium integrated with Azure Pipelines multi-job strategy enables automated, parallel UI testing with results reported back to the pipeline for quality gates.

Q13 Hard

Your organization must maintain compliance with data residency regulations. How should you configure Azure Pipelines agents to ensure builds occur in a specific geographic region?

  • A Store all code in a geo-replicated Git repository without agent configuration
  • B Configure Azure DevOps organization settings to filter agents by IP geolocation
  • C Use Microsoft-hosted agents as they automatically distribute workloads across all regions
  • D Deploy self-hosted agents in the required region and assign them to a specific agent pool ✓ Correct
Explanation

Self-hosted agents deployed in a specific region and assigned to a dedicated agent pool ensure builds execute within the required geographic location for compliance.

Q14 Hard

You are designing a release pipeline for a microservices architecture. Which deployment pattern should you use to minimize blast radius if a service update fails?

  • A Deploy services weekly in a single maintenance window
  • B Deploy services in dependency order with health checks and automated rollback capabilities between each service ✓ Correct
  • C Deploy all microservices simultaneously in a single release stage
  • D Use manual deployments with email notifications only
Explanation

Progressive microservice deployments with health checks and automated rollback limit failure impact by allowing individual service rollback while others remain operational.

Q15 Medium

Your team implements a build pipeline that generates multiple artifacts. You need to selectively copy specific artifacts to different release stages. Which Azure Pipelines task should you use?

  • A Download Build Artifacts task with filtering and stage-specific download patterns ✓ Correct
  • B Azure Storage copy task to manually transfer files between containers
  • C Git clone task to retrieve all artifacts from the repository
  • D Resource download task that downloads all available artifacts without filtering
Explanation

The Download Build Artifacts task allows selective artifact retrieval based on patterns and stage requirements, enabling efficient artifact management across pipeline stages.

Q16 Medium

You need to implement a feedback loop from production monitoring back to your development team. Which practice aligns with DevOps principles?

  • A Collect production metrics and create work items for performance improvements based on actual usage patterns ✓ Correct
  • B Maintain separate monitoring teams that report quarterly to developers without actionable items
  • C Archive all production logs without analysis or review
  • D Disable production monitoring to reduce operational overhead
Explanation

Implementing feedback loops from production monitoring creates actionable insights for developers, enabling continuous improvement aligned with DevOps principles.

Q17 Medium

Your organization uses Azure DevOps with multiple projects. You need to share variable groups across projects for consistency. What is the recommended approach?

  • A Create variable groups at the organization level and grant appropriate permissions for project access ✓ Correct
  • B Store all variables as environment variables on build agent machines
  • C Duplicate variable groups manually in each project and update them separately
  • D Use only inline variables within individual pipelines to ensure isolation
Explanation

Organization-level variable groups in Azure DevOps allow sharing and consistent management of variables across multiple projects with controlled permissions.

Q18 Medium

You implement a policy requiring all pull requests to have code reviews from at least two reviewers. A senior developer claims this slows down the release process. How should you respond?

  • A Exempt senior developers from the review requirement to accelerate releases
  • B Remove the review requirement entirely and rely on automated testing only
  • C Explain that code review gates reduce defects and support costs, improving overall delivery velocity and quality ✓ Correct
  • D Allow single-reviewer approval as a compromise to speed up the process
Explanation

Code review policies create quality gates that catch defects early, reducing downstream costs and improving long-term velocity, even if individual reviews take time.

Q19 Easy

You need to automate the creation of work items based on test failures in your CI/CD pipeline. Which approach is recommended?

  • A Manually create work items each time a test fails in the pipeline
  • B Send email notifications to developers without creating tracked work items
  • C Configure Azure Pipelines to create work items automatically when tests fail using the Create Work Item task ✓ Correct
  • D Ignore test failures and fix them in the next sprint planning session
Explanation

The Create Work Item task in Azure Pipelines automates work item generation from test failures, ensuring issues are tracked and prioritized appropriately.

Q20 Medium

Your organization implements Infrastructure as Code using Terraform. You need to validate Terraform configurations before deployment. Which tool should be integrated into your pipeline?

  • A Terraform validate and tflint for syntax checking and linting of Terraform code ✓ Correct
  • B Manual code review without automated validation
  • C Only run Terraform apply without any validation steps
  • D Use PowerShell scripts to manually verify configuration files
Explanation

Terraform validate and tflint tools provide automated syntax checking, linting, and best practice validation for Infrastructure as Code before deployment.

Q21 Medium

You are designing a notification strategy for pipeline failures. Which approach provides the best balance between alerting teams and avoiding notification fatigue?

  • A Disable all notifications and rely on developers checking the pipeline dashboard continuously
  • B Send individual email notifications for every build step that executes regardless of success or failure
  • C Notify all organization members of every pipeline event through multiple channels
  • D Configure notifications only for critical stages and failures with targeted recipient groups and summary details ✓ Correct
Explanation

Targeted notifications for critical stages and failures with appropriate recipient groups reduce notification fatigue while ensuring important issues receive timely attention.

Q22 Hard

Your team needs to implement canary deployments for a web application. Which Azure service combination best supports this pattern?

  • A Azure SQL Database for deployment tracking
  • B Azure Service Bus for message queuing during deployments
  • C Azure Blob Storage for artifact versioning only
  • D Azure Application Insights for traffic routing analysis combined with Azure Traffic Manager for gradual traffic shifting ✓ Correct
Explanation

Application Insights provides metrics collection while Traffic Manager can route traffic gradually to the canary version, enabling safe validation before full rollout.

Q23 Hard

You need to implement secret rotation for credentials used in your CI/CD pipeline. What is the recommended approach using Azure Key Vault?

  • A Configure Key Vault rotation policies and update pipeline references to automatically use the latest secret version ✓ Correct
  • B Manually rotate secrets quarterly and manually update all pipeline configurations
  • C Store rotating credentials in plain text configuration files with version control
  • D Store credentials indefinitely without rotation and rely on access logs for security
Explanation

Key Vault rotation policies combined with dynamic secret references in pipelines enable automatic credential rotation without manual intervention or pipeline downtime.

Q24 Medium

Your organization uses GitHub for version control but Azure DevOps for work item tracking. How should you integrate these systems for a cohesive DevOps workflow?

  • A Maintain completely separate workflows without any integration between systems
  • B Manually copy work items between systems using spreadsheets
  • C Use Azure Pipelines GitHub connector to trigger builds and configure work item linking through Azure DevOps extensions ✓ Correct
  • D Abandon either GitHub or Azure DevOps to use a single system
Explanation

Azure Pipelines supports GitHub repositories with built-in connectors, and Azure DevOps extensions enable linking between GitHub commits and Azure DevOps work items.

Q25 Hard

You need to implement a policy that prevents merge of pull requests with insufficient code coverage. How should you configure this in Azure Repos?

  • A Use file locks to prevent commits from uncovered code paths
  • B Configure branch policies with build validation and use code coverage analysis from your test results as a quality gate ✓ Correct
  • C Require all tests to pass regardless of coverage percentage
  • D Manually review code coverage reports and approve or reject pull requests without automation
Explanation

Branch policies combined with build validation can enforce code coverage thresholds from test results, preventing merges that don't meet coverage requirements.

Q26 Medium

Your organization uses Azure Repos and wants to implement a branching strategy that supports continuous delivery with minimal merge conflicts. Which branching strategy is most suitable for a team practicing trunk-based development?

  • A Release Flow with quarterly integration windows
  • B GitHub Flow with permanent release branches
  • C Git Flow with long-lived develop and master branches
  • D Trunk-based development with short-lived feature branches ✓ Correct
Explanation

Trunk-based development with short-lived feature branches is ideal for continuous delivery, minimizing merge conflicts through frequent integration. Long-lived branches like in Git Flow introduce complexity that contradicts trunk-based principles.

Q27 Medium

You are implementing a CI/CD pipeline in Azure Pipelines. Your team requires that all pull requests must have at least two code reviews before merging. Where should you configure this policy?

  • A In Azure Repos branch protection rules and pull request policies ✓ Correct
  • B In the Azure Pipelines service connection configuration
  • C In Azure DevOps project settings under Pipeline requirements
  • D In the Pipeline YAML file using the pr validation step
Explanation

Pull request policies including code review requirements are configured in Azure Repos branch protection rules and pull request policies, not in pipeline definitions. This ensures the policy is enforced at the repository level regardless of the CI/CD tool.

Q28 Easy

Your organization is implementing Infrastructure as Code using Azure Resource Manager templates. Which approach best ensures version control and auditability of infrastructure changes?

  • A Use Azure Blueprints exclusively without version control integration
  • B Store ARM templates in Azure Repos with commit history and use automated deployments from CI/CD pipelines ✓ Correct
  • C Store ARM templates in a shared network drive with manual change tracking
  • D Manually update resources through the Azure portal and document changes in a spreadsheet
Explanation

Storing ARM templates in Azure Repos provides version control, commit history, and enables automated deployments through CI/CD pipelines, ensuring auditability and traceability of infrastructure changes. This is a core DevOps practice.

Q29 Medium

You need to implement security scanning in your Azure Pipelines CI/CD workflow to detect vulnerabilities in open-source dependencies before deployment. Which Azure service should you integrate?

  • A Azure Security Center for infrastructure vulnerability scanning only
  • B Azure Policy for compliance checking only
  • C Azure Firewall for network-level scanning
  • D WhiteSource Bolt or Microsoft Dependency Check integrated into the pipeline ✓ Correct
Explanation

WhiteSource Bolt or Microsoft Dependency Check are purpose-built tools for scanning dependencies and identifying vulnerabilities in open-source packages within CI/CD pipelines. They can be integrated as pipeline tasks for automated security validation.

Q30 Medium

Your team is designing a release pipeline strategy where different environments (Dev, Staging, Production) require different approval workflows. What is the recommended approach using Azure Pipelines?

  • A Create separate pipeline YAML files for each environment and manually trigger each
  • B Use a single pipeline with multiple stages and configure approval gates and pre-deployment conditions per environment ✓ Correct
  • C Create independent pipelines with hardcoded environment values for each stage
  • D Use Azure DevOps release classic pipelines only, avoiding YAML-based pipelines
Explanation

A single pipeline with multiple stages allows you to define environment-specific approval gates and pre-deployment conditions using stage dependencies and approval gates in YAML or release pipelines. This provides flexibility while maintaining a single source of truth.

Q31 Medium

You are implementing containerized applications in Azure Kubernetes Service (AKS). Which approach best integrates container image scanning for vulnerabilities into your DevOps workflow?

  • A Disable image scanning to improve deployment speed
  • B Scan only production images after they have been running for 30 days
  • C Use Azure Container Registry (ACR) tasks and integrate Trivy or Aqua scanning into the build pipeline before pushing to registry ✓ Correct
  • D Scan images manually after deployment using external tools
Explanation

Integrating vulnerability scanning via ACR tasks or pipeline tasks like Trivy before images are pushed to the registry ensures security issues are caught early in the development cycle, enabling shift-left security practices.

Q32 Easy

Your organization wants to monitor deployment frequency and lead time for changes as key DevOps metrics. Which Azure service provides built-in dashboards for these DORA metrics?

  • A Azure Log Analytics exclusively
  • B Application Insights only
  • C Azure Monitor only
  • D Azure DevOps Analytics and the Insights views in Azure DevOps ✓ Correct
Explanation

Azure DevOps Analytics and Insights provide built-in views for DORA metrics including deployment frequency, lead time for changes, and failure rate, accessible directly within the Azure DevOps portal.

Q33 Hard

You need to implement a strategy for managing secrets (API keys, connection strings) in Azure Pipelines without exposing them in logs or YAML files. What is the most secure approach?

  • A Store secrets in a public GitHub repository and retrieve them during the build
  • B Store secrets in pipeline variables with the 'secret' checkbox enabled and retrieve them at runtime
  • C Embed secrets directly in the YAML file with base64 encoding
  • D Use Azure Key Vault with managed identities for pipeline service principals and fetch secrets at runtime ✓ Correct
Explanation

Using Azure Key Vault with managed identities provides defense-in-depth security, ensuring secrets are never stored in code or pipeline definitions and access is auditable. Secrets are fetched securely at runtime using the pipeline's managed identity.

Q34 Medium

Your team is using Azure Repos Git and wants to implement a policy that automatically rejects push attempts that contain secrets or API keys. Which solution should you implement?

  • A Manual code review processes without automation
  • B Azure Repos Commit Hooks configured manually on each developer machine
  • C Azure DevOps Credential Scanner (CredScan) integrated into build pipelines with blocking enforcement ✓ Correct
  • D GitHub Advanced Security secret scanning
Explanation

Azure DevOps Credential Scanner (CredScan) can be integrated into build pipelines to detect secrets in committed code and configured to block pushes or builds when secrets are found, providing automated enforcement across the team.

Q35 Hard

You are designing a multi-stage deployment pipeline where the Production stage should only deploy if the Staging stage has been running without critical incidents for at least 24 hours. How would you implement this requirement?

  • A Use manual approval gates that require a human to verify the 24-hour window
  • B Implement a custom Azure Function that enforces the 24-hour delay before approving production deployment
  • C Configure pre-deployment gates with query conditions checking Azure Monitor data for critical alerts ✓ Correct
  • D Use a scheduled trigger that delays production deployments by 24 hours automatically
Explanation

Pre-deployment gates in Azure Pipelines can query Azure Monitor or other services to check for critical incidents, allowing you to conditionally approve deployments based on health metrics and incident data from the previous stage.

Q36 Easy

Your organization uses GitHub for source control but wants to integrate with Azure Pipelines for CI/CD. What is required to establish this integration?

  • A GitHub and Azure Pipelines use the same underlying infrastructure, so no configuration is needed
  • B Create a GitHub service connection in Azure DevOps and authorize it with a GitHub personal access token ✓ Correct
  • C Use only GitHub Actions and abandon Azure Pipelines entirely
  • D Export code from GitHub to Azure Repos since they cannot be integrated
Explanation

Azure Pipelines supports GitHub as a source control system through a GitHub service connection that requires authorization via a personal access token, enabling CI/CD workflows for GitHub-hosted repositories.

Q37 Medium

You need to implement automated testing for your application in the build pipeline. Your team wants to ensure that test failures block the build and prevent deployment. How should you configure this?

  • A Skip tests during CI and run them manually in staging environments only
  • B Configure test tasks with 'continueOnError: false' and set the build to fail if tests do not pass ✓ Correct
  • C Run tests as optional tasks that only log warnings if they fail
  • D Run tests in a separate pipeline that is not connected to the build pipeline
Explanation

Setting 'continueOnError: false' on test tasks ensures that any test failures will cause the build to fail and prevent downstream stages from executing, enforcing quality gates in the pipeline.

Q38 Medium

Your organization is implementing Infrastructure as Code with Terraform and wants to store state files securely in Azure. Which Azure service is recommended for storing Terraform state with encryption and concurrent access control?

  • A Azure Blob Storage with a storage account key only
  • B Azure Files SMB shares with no encryption
  • C Azure Blob Storage with role-based access control (RBAC) and encryption at rest enabled ✓ Correct
  • D Local file system on Azure VMs
Explanation

Azure Blob Storage with RBAC and encryption at rest provides secure storage for Terraform state files, preventing unauthorized access and ensuring data is encrypted. This is the recommended approach for production Terraform state management.

Q39 Medium

You are implementing a blue-green deployment strategy in Azure App Service to enable zero-downtime deployments. What is the first step in setting up this strategy?

  • A Use App Service Deployment Slots to create a staging environment, test it, and swap with production ✓ Correct
  • B Deploy to two regions and configure geo-failover
  • C Manually stop the production app and deploy the new version
  • D Create two separate App Service plans with identical configurations and use traffic manager to route between them
Explanation

App Service Deployment Slots provide a built-in mechanism for blue-green deployments in Azure App Service, allowing you to deploy and validate in a staging slot before swapping with production, ensuring zero downtime.

Q40 Hard

Your team wants to implement automated rollback functionality in your deployment pipeline. If a deployment to production fails health checks, the previous version should be automatically restored. Which Azure service feature enables this?

  • A Azure App Service Deployment Slots with automated swap-back on health check failure ✓ Correct
  • B Azure Traffic Manager failover only
  • C Azure Pipelines post-deployment gates with conditional rollback logic
  • D Manual rollback procedures documented in a wiki
Explanation

App Service Deployment Slots can be configured to automatically swap back to the previous version if post-deployment health checks fail, providing automated rollback without manual intervention.

Q41 Easy

You are configuring source control security for your Azure Repos project. You want to prevent users from deleting branches without approval. Where should you configure this policy?

  • A In the service connection configuration
  • B In the Azure Pipelines YAML file
  • C In Azure Repos branch policies and permissions settings ✓ Correct
  • D In the Azure DevOps project settings under Pipeline requirements
Explanation

Branch deletion permissions and protections are configured in Azure Repos under branch policies and repository permissions, which control who can delete branches and whether approval is required.

Q42 Easy

Your organization uses Azure DevOps for project management and wants to link work items to code commits and pull requests for traceability. What naming convention should be used in commit messages?

  • A Prefix commits with '#' followed by the work item ID (e.g., '#123 fix login bug') ✓ Correct
  • B Store the work item ID in the commit author name field
  • C Any format that includes the work item description in the message
  • D Use separate metadata files to track work item associations
Explanation

Azure DevOps automatically links work items to commits and pull requests when the commit message includes '#' followed by the work item ID, enabling traceability without additional tools or manual processes.

Q43 Medium

You need to implement Continuous Monitoring (CM) for your deployed applications. Which combination of Azure services provides comprehensive application and infrastructure monitoring?

  • A Azure Monitor for metrics and Application Insights for application tracing and performance ✓ Correct
  • B Azure DevOps only, as it provides all monitoring capabilities
  • C Local logging files stored on each virtual machine
  • D Azure Service Health for all monitoring needs
Explanation

Azure Monitor provides infrastructure and system metrics while Application Insights offers deep application-level tracing, performance monitoring, and custom telemetry, together providing comprehensive CM coverage.

Q44 Hard

Your team is implementing GitOps for managing Kubernetes deployments in AKS. Which tool integrates with Azure Repos and AKS to automatically sync desired state from Git to the cluster?

  • A Flux or ArgoCD deployed in the AKS cluster with Git repository configuration ✓ Correct
  • B Manual kubectl apply commands from the pipeline
  • C Azure Resource Manager templates only
  • D Azure Pipelines only
Explanation

Flux and ArgoCD are GitOps operators that can be deployed in AKS and continuously sync the cluster state with the desired state defined in a Git repository, enabling declarative infrastructure management.

Q45 Medium

You are implementing a policy where all code changes must pass static code analysis and meet quality gates before merging to main branch. Which Azure service component enforces this?

  • A Branch policies with required status checks and SonarQube integration in pull request validations ✓ Correct
  • B Azure Repos backup settings
  • C Azure Pipelines build definition only
  • D Azure DevOps Wiki for documentation
Explanation

Branch policies can be configured to require successful completion of status checks (including SonarQube or other code analysis tools) before pull requests can be merged, enforcing quality gates at the repository level.

Q46 Medium

Your organization wants to implement automated database schema migrations as part of the deployment pipeline. Which approach is recommended for version controlling schema changes?

  • A Export database schema directly from production and use it as the source of truth
  • B Use a migration tool like Flyway or Liquibase with versioned scripts stored in source control alongside application code ✓ Correct
  • C Store migration scripts in a separate repository and apply them manually before each deployment
  • D Require all schema changes to be performed manually by DBAs
Explanation

Version control tools like Flyway or Liquibase enable declarative database migrations that are treated like code, allowing them to be tested, reviewed, and deployed automatically as part of the CI/CD pipeline.

Q47 Medium

You need to configure Azure Pipelines to use a self-hosted agent pool that is only accessible from a specific corporate network. How should you set this up while maintaining security?

  • A Configure the agent to accept all connections without network restrictions
  • B Store credentials in plain text in the agent configuration file
  • C Install the self-hosted agent behind a corporate firewall and configure it to communicate outbound to Azure DevOps through a proxy ✓ Correct
  • D Use only Microsoft-hosted agents which cannot access corporate networks
Explanation

Self-hosted agents can be configured to communicate outbound to Azure DevOps through a proxy or firewall, allowing them to be network-restricted while maintaining secure connectivity to the DevOps service.

Q48 Medium

Your team wants to implement feature flags in your application to enable canary deployments where new features are rolled out to a percentage of users. Which Azure service integrates with your application code for feature flag management?

  • A Manual configuration files deployed with each release
  • B Azure DevOps feature tracking
  • C Azure Pipelines variable substitution only
  • D Azure App Configuration with Feature Manager integration in your application code ✓ Correct
Explanation

Azure App Configuration with Feature Manager provides a centralized store for feature flags that can be toggled at runtime, allowing applications to reference flags dynamically and enabling canary deployments without redeployment.

Q49 Medium

You are designing a compliance solution where all deployed resources must be tagged with cost center and environment information. How should you enforce this in your infrastructure deployments?

  • A Use Azure Policy to enforce required tags and audit non-compliant resources, with blocking or remediation configurations ✓ Correct
  • B Document tagging requirements in a wiki and hope developers follow them
  • C Manually add tags to resources after deployment
  • D Store tags in a separate spreadsheet for tracking
Explanation

Azure Policy can enforce tagging requirements on resources, automatically blocking non-compliant deployments or auto-remediating them, ensuring all resources meet organizational tagging standards for compliance and cost management.

Q50 Medium

Your organization uses Azure Pipelines to build and deploy applications. You need to implement a strategy to manage secrets and sensitive data across multiple pipeline stages. Which approach provides the best security while maintaining ease of access?

  • A Use environment variables in the agent virtual machine for all sensitive data
  • B Store secrets in a shared Azure Storage account with access controls
  • C Store secrets in Azure Key Vault and reference them in pipeline variable groups with linked secrets ✓ Correct
  • D Embed secrets directly in pipeline YAML files with encryption enabled
Explanation

Azure Key Vault integration with pipeline variable groups provides secure, centralized secret management with encryption at rest and in transit. This is the recommended Microsoft practice for handling sensitive data in CI/CD pipelines.

Q51 Medium

You are implementing infrastructure as code using Terraform in Azure DevOps. The Terraform state file contains sensitive information and must be protected. Where should you store the Terraform state file to meet security requirements?

  • A In an Azure Storage account with encryption enabled and access restricted via storage account keys stored in Key Vault ✓ Correct
  • B In a local directory on the build agent with restricted file permissions
  • C In a git repository with branch protection rules configured
  • D In Azure Artifacts with package retention policies
Explanation

Azure Storage with encryption and access controlled through Key Vault is the secure, scalable solution for Terraform state management. This prevents unauthorized access and ensures the sensitive state data is properly protected.

Q52 Easy

Your team is setting up a multi-stage deployment pipeline with approval gates. You need to ensure that deployments to production require manual approval from specific team members. Which feature in Azure Pipelines should you configure?

  • A Service principal authentication with role-based access control
  • B Branch policies with required reviewers
  • C Azure Policy assignments at the subscription level
  • D Release pipeline checks and approvals on the production stage ✓ Correct
Explanation

Release pipeline checks and approvals allow you to configure manual approval gates for specific stages, ensuring only authorized users can approve deployments to production environments.

Q53 Medium

You need to analyze code quality and security vulnerabilities in a containerized application before deployment. Which combination of tools should be integrated into your Azure Pipeline?

  • A GitHub Advanced Security features exclusively
  • B Manual code reviews and penetration testing after production deployment
  • C Azure Application Insights for runtime monitoring only
  • D SonarQube for code quality analysis and Trivy for container image scanning ✓ Correct
Explanation

SonarQube analyzes code quality and technical debt, while Trivy scans container images for vulnerabilities. Integrating both into the pipeline enables shift-left security practices and early issue detection.

Q54 Medium

Your organization is adopting a trunk-based development strategy with Azure Repos. To support continuous integration while maintaining code quality, which branching strategy should you implement?

  • A Use a single main branch with short-lived feature branches and frequent merges enabled by feature flags ✓ Correct
  • B Create a new branch for each bug fix that persists after production deployment
  • C Maintain separate branches for development, staging, and production environments indefinitely
  • D Create a main branch and feature branches that exist for several months before merging
Explanation

Trunk-based development uses a main branch with short-lived feature branches and frequent integrations. Feature flags decouple deployment from feature release, supporting continuous integration while managing risk.

Q55 Hard

You are implementing Azure DevOps with on-premises application servers. The organization requires that build artifacts be stored locally for compliance reasons. Which artifact storage solution meets this requirement?

  • A Direct deployment without artifact storage, building on each deployment
  • B A self-hosted artifact feed using Azure Artifacts on an on-premises server or local NuGet feed with access controls ✓ Correct
  • C GitHub Packages exclusively for all artifact storage
  • D Azure Artifacts in a private Azure DevOps project with network restrictions
Explanation

Self-hosted artifact feeds or local NuGet feeds allow artifact storage on-premises, meeting compliance and data residency requirements while maintaining artifact management capabilities.

Q56 Hard

Your pipeline deploys microservices to a Kubernetes cluster. You need to implement a deployment strategy that allows gradual rollout while monitoring metrics and automatically rolling back on failure. Which deployment pattern should you use?

  • A Big bang deployment to all pods simultaneously with backup restore capability
  • B Blue-green deployment with manual verification between stages
  • C Rolling restart of pods without traffic management
  • D Canary deployment with automated rollback based on metric thresholds using tools like Flagger ✓ Correct
Explanation

Canary deployments gradually roll out to a subset of users, enabling metric-based validation and automated rollback decisions. This minimizes blast radius and reduces risk in production environments.

Q57 Medium

You need to implement automated testing across multiple environments (dev, staging, production) with different data sets. How should you parameterize your test pipeline to handle environment-specific configurations?

  • A Create separate pipeline definitions for each environment with duplicated configuration
  • B Hard-code environment values in test scripts and manually update before each run
  • C Store all configuration in a single environment variable file committed to the repository
  • D Use pipeline variables, variable groups linked to Key Vault, and template parameters for environment-specific configuration ✓ Correct
Explanation

Pipeline variables, variable groups, and template parameters provide flexible, secure configuration management across environments without code duplication or manual intervention.

Q58 Hard

Your organization monitors application performance in production using Azure Application Insights. You want to automatically trigger a rollback of a recent deployment if error rates exceed a threshold. Which Azure service should orchestrate this automated response?

  • A Azure Monitor alert rules that directly invoke kubectl commands on the cluster
  • B Azure Automation Runbooks triggered by alert rules from Application Insights
  • C Azure Policy definitions that automatically remediate deployments
  • D Azure DevOps Release Pipeline with continuous deployment and monitoring gate conditions ✓ Correct
Explanation

Azure DevOps Release Pipelines support monitoring gates that can evaluate metrics from Application Insights and trigger automatic rollback or halt deployment progression based on defined thresholds.

Q59 Medium

You are designing a CI/CD solution where developers work across geographically distributed locations. You need to optimize pipeline execution time and reduce latency for artifact downloads. Which strategy should you implement?

  • A Implement parallel pipelines that run sequentially across regions without caching
  • B Require developers to download artifacts manually from a central repository
  • C Use a single centralized build server in one geographic location for all builds
  • D Deploy Azure DevOps agents in multiple regions and use Azure Content Delivery Network (CDN) for artifact distribution ✓ Correct
Explanation

Distributed agents in multiple regions combined with CDN for artifact delivery minimize latency and build times for geographically distributed teams while improving overall throughput.

Ready to test your knowledge?

You've reviewed all 59 questions. Take the interactive practice exam to simulate the real test environment.

▶ Start Practice Exam — Free