Back to Microsoft Azure DevOps Engineer Expert AZ-400 questions

Scenario-based practice

Refer to the Exhibit Practice Questions

Practise Microsoft Azure DevOps Engineer Expert AZ-400 practice questions — original exam-style scenarios covering every exam domain, with detailed explanations, wrong-answer analysis, and common exam traps.

15
scenario questions
AZ-400
exam code
Microsoft
vendor

Scenario guide

How to approach refer to the exhibit practice questions

Practise exhibit-style questions that ask you to read a topology, table, command output or diagram before choosing the best answer.

Quick answer

Exhibit-style questions test whether you can read a topology, command output, diagram or table before choosing the best answer.

How to extract the relevant detail from an exhibit.

How topology, command output or routing information affects the answer.

How to avoid answering from memory before reading the evidence.

How to map the exhibit back to the exam objective.

Related practice questions

Related AZ-400 topic practice pages

Scenario questions usually connect to one or more exam topics. Use these links to review the underlying concepts behind the scenario.

Practice set

Practice scenarios

Question 1hardmultiple choice
Full question →

You are debugging a production issue using Application Insights Snapshot Debugger. The exhibit shows a snapshot from a NullReferenceException. The variable _dbContext is null. What is the most likely root cause?

Exhibit

Refer to the exhibit.

```
Application Insights Snapshot Debugger

Snapshot 1: 
  Thread: 1234
  Exception: NullReferenceException
  Stack:
    Contoso.Web.Pages.Index.OnGet() line 42
    Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethod()
    ...
  Local variables:
    _dbContext: null (Contoso.Data.AppDbContext)
```
Question 2easymultiple choice
Full question →

You run the Azure CLI command shown in the exhibit. What is the output?

Network Topology
$ az vm listquery "[?location=='eastus'].{Name:nameoutput tableRefer to the exhibit.```Name ResourceGroupvm1 rg-prodvm2 rg-dev
Question 3hardmultiple choice
Full question →

An Azure Policy is defined as shown in the exhibit. You attempt to create a storage account with HTTPS traffic only set to false. What will happen?

Exhibit

Refer to the exhibit.

```
{
  "properties": {
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Storage/storageAccounts"
          },
          {
            "field": "Microsoft.Storage/storageAccounts/supportsHttpsTrafficOnly",
            "equals": "false"
          }
        ]
      },
      "then": {
        "effect": "deny"
      }
    }
  }
}
```
Question 4easymultiple choice
Full question →

The exhibit shows a draft Azure Monitor alert rule for Key Vault secret expiry. However, the query fails to return results for secrets that have already expired. What is the most likely reason?

Exhibit

Refer to the exhibit.

```json
{
  "alertRule": {
    "displayName": "Key Vault Secret Near Expiry",
    "query": "// Azure Resource Graph query
    resources
    | where type == 'microsoft.keyvault/vaults/secrets'
    | extend DaysToExpiry = datetime_diff('day', now(), properties.attributes.expiresOn)
    | where DaysToExpiry < 30 and DaysToExpiry > 0
    | project name, vaultName = resourceGroup, expiresOn = properties.attributes.expiresOn, DaysToExpiry
    | limit 10"
  }
}
```
Question 5hardmultiple choice
Full question →

Refer to the exhibit. The pipeline is configured as shown. A developer pushes a change to the `main` branch that modifies a file under `src/Controllers/HomeController.cs` and also adds a new file under `docs/readme.md`. Which of the following best describes what happens?

Network Topology
configuration $(buildConfiguration)'arguments: 'configuration $no-build'Refer to the exhibit.```yaml# azure-pipelines.ymltrigger:branches:include:- main- release/*paths:exclude:- docs/*- tests/*pool:vmImage: 'ubuntu-latest'variables:buildConfiguration: 'Release'steps:- task: DotNetCoreCLI@2inputs:command: 'build'projects: '**/*.csproj'displayName: 'Build project'command: 'test'projects: '**/*Tests/*.csproj'displayName: 'Run tests'```
Question 6mediummultiple choice
Full question →

Refer to the exhibit. A release is created with the above command. The Dev environment starts deploying, but the Prod environment does not. Which is the most likely reason?

Network Topology
az pipelines release createdefinition-id 5description "Release v1.0"artifacts '{"build":{"buildId":123}}'output json"id": 45,"status": "inProgress","createdOn": "2025-03-03T12:00:00Z","modifiedBy": null,"releaseDefinition": {"id": 5,"name": "ReleasePipeline"},"environments": ["name": "Dev","preDeployApprovals": [],"deploySteps": []"name": "Prod","status": "notStarted",
Question 7hardmultiple choice
Full question →

Refer to the exhibit. A build pipeline uses this trigger configuration. A developer pushes a commit to the 'main' branch that modifies files in '/src/app/' and '/src/tests/'. How many builds will be triggered?

Exhibit

{
  "triggers": [
    {
      "branchFilters": ["main", "develop"],
      "paths": {
        "include": ["/src/*"],
        "exclude": ["/src/tests/*"]
      },
      "batchChanges": true,
      "maxConcurrentBuildsPerBranch": 1,
      "triggerType": "continuousIntegration"
    }
  ]
}
Question 8hardmultiple choice
Full question →

Refer to the exhibit. A developer queues a build manually but notices the build status remains 'notStarted' for an extended period. The pipeline has no demands and priority is normal. Which is the most likely cause?

Network Topology
az pipelines build queuedefinition-id 123branch mainvariables '{"BuildConfiguration":"Release"}'output json"buildNumber": "20250303.1","status": "notStarted","queueTime": "2025-03-03T10:00:00Z","definition": {"id": 123,"name": "MyPipeline"},"parameters": "{}","demands": [],"priority": "normal","reason": "manual","triggeredBy": {"displayName": "John Doe"
Question 9mediummultiple choice
Full question →

Refer to the exhibit. A developer creates a pipeline with this YAML. When a commit is pushed to the 'main' branch of the repository 'MyProject/MyRepo', the pipeline does NOT trigger. Which is the most likely cause?

Exhibit

resources:
  repositories:
    - repository: internal
      type: git
      name: MyProject/MyRepo
      ref: refs/heads/main
      trigger:
        branches:
          include:
            - main
            - release/*

pool:
  vmImage: 'ubuntu-latest'

steps:
  - checkout: self
  - checkout: internal
  - script: echo "Building..."
Question 10hardmultiple choice
Full question →

Refer to the exhibit. You queue a build in Azure Pipelines. The build status remains 'notStarted' for an extended period. What is the most likely reason?

Network Topology
az pipelines build queuedefinition-id 42branch main"id": 12345,"status": "notStarted","queueTime": "2023-01-15T10:00:00Z","priority": "normal","demands": ["Agent.OS -equals Linux","Agent.Version -gtVersion 2.170.1"],"pool": {"id": 7,"name": "Azure Pipelines","isHosted": true
Question 11hardmultiple choice
Full question →

Refer to the exhibit. A build pipeline produces the above logs. Which change would resolve the build failure?

Network Topology
##[command]dotnet buildconfiguration Release##[command]dotnet testno-build##[section]Starting: Build...##[error]CSCerror CS0117:'MyClass' does not contain a definition for 'MyMethod' [D:\a\1\s\MyProject\MyProject.csproj]##[section]Finishing: Build##[section]Starting: Test##[warning]No test results found. Exiting.##[section]Finishing: Test
Question 12hardmultiple choice
Full question →

Refer to the exhibit. You have an availability set with two VMs. One VM shows a degraded availability state. What is the most likely impact on application availability?

Exhibit

Resource Group: rg-devops
Location: eastus

Properties:
  provisioningState: Succeeded
  platformFaultDomainCount: 2
  platformUpdateDomainCount: 5
  virtualMachines:
    - id: /subscriptions/.../vm1
    - id: /subscriptions/.../vm2
  statuses:
    - code: AvailabilityState
      level: Warning
      displayStatus: Degraded
      message: 'VM vm1 is not running on the fault tolerant infrastructure due to an ongoing platform event.'
Question 13hardmultiple choice
Full question →

Refer to the exhibit. You apply this Azure Policy to a subscription. A developer attempts to deploy a VM with SKU Standard_D2s_v3. What is the result?

Exhibit

{
  "if": {
    "allOf": [
      {
        "field": "type",
        "equals": "Microsoft.Compute/virtualMachines"
      },
      {
        "field": "Microsoft.Compute/virtualMachines/sku.name",
        "like": "Standard_D*"
      }
    ]
  },
  "then": {
    "effect": "deny"
  }
}
Question 14mediummultiple choice
Full question →

Refer to the exhibit. You monitor an Azure App Service web app. At 10:30 AM, you observe a spike in HTTP 5xx errors and response time. Based on the metrics, what is the most likely cause?

Exhibit

Metrics for WebApp1 (last 24 hours):
Time        | Requests | HTTP 5xx | AverageResponseTime
10:00 AM   | 1200     | 0        | 200 ms
10:05 AM   | 1500     | 0        | 210 ms
10:10 AM   | 1800     | 0        | 220 ms
10:15 AM   | 2000     | 0        | 230 ms
10:20 AM   | 2200     | 0        | 240 ms
10:25 AM   | 2500     | 0        | 250 ms
10:30 AM   | 3000     | 15       | 500 ms
10:35 AM   | 2800     | 12       | 480 ms
10:40 AM   | 2600     | 8        | 450 ms
10:45 AM   | 2400     | 3        | 400 ms
Question 15hardmultiple choice
Full question →

You are reviewing an Azure Policy assignment in a DevOps environment. The exhibit shows the policy assignment JSON. The policy set includes the built-in policy 'Allowed Locations' with effect Deny. During a pipeline deployment, a resource creation fails with a policy violation error. The resource being deployed is a storage account in the 'centralus' region. What is the most likely reason for the failure?

Exhibit

Refer to the exhibit.

{
  "properties": {
    "policyDefinitions": [
      {
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/bfd4f8c3-4b5d-4a7d-8c9a-1e2f3a4b5c6d",
        "parameters": {
          "effect": {
            "value": "Deny"
          },
          "allowedLocations": {
            "value": ["eastus", "westus"]
          }
        }
      }
    ],
    "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
  },
  "id": "/subscriptions/sub123/resourceGroups/rg-devops/providers/Microsoft.Authorization/policyAssignments/assignment-dev",
  "type": "Microsoft.Authorization/policyAssignments",
  "name": "assignment-dev",
  "location": "eastus"
}

These AZ-400 practice questions are part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style AZ-400 questions with detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics.