Courseiva
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
Read the full NAT/PAT explanation →

Refer to the exhibit. You have configured a Conditional Access policy in Microsoft Entra ID to require MFA for Azure DevOps. However, users report that they can still access Azure DevOps without MFA when using a PAT for authentication. What is the most likely reason?

Exhibit

{
  "policy": {
    "name": "Require MFA for Azure DevOps",
    "type": "Conditional Access Policy",
    "assignments": {
      "users": "All users",
      "cloud_apps": "Azure DevOps",
      "conditions": {
        "client_apps": ["Browser", "Mobile apps and desktop clients"]
      },
      "grant_controls": {
        "built_in_controls": ["Mfa"]
      }
    }
  }
}
Question 2hardmultiple 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 3mediummultiple 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 4hardmultiple choice
Full question →

Refer to the exhibit. The workflow runs successfully but the deployment fails because the Azure CLI is not authenticated. What should you add to the workflow to authenticate?

Network Topology
az webapp deployresource-group myRGname myAppsrc-path ./app.zipRefer to the exhibit.```yaml# .github/workflows/deploy.ymlname: Deployon:push:branches:- mainjobs:deploy:runs-on: ubuntu-latestenvironment: productionsteps:- uses: actions/checkout@v2- name: Deploy to Azurerun: |```
Question 5easymultiple choice
Full question →

The exhibit shows an Azure CLI command to run a pipeline. What does this command do?

Network Topology
$ az pipelines runname "MyPipeline"branch mainvariables myVar="value1"Refer to the exhibit.```bash```
Question 6hardmultiple choice
Full question →

Refer to the exhibit. A developer pushes a commit to the main branch. Which stages will run?

Exhibit

Refer to the exhibit.
```yaml
# azure-pipelines.yml
trigger:
  branches:
    include:
      - main
      - develop

stages:
- stage: Build
  jobs:
  - job: BuildJob
    pool:
      vmImage: ubuntu-latest
    steps:
    - script: echo "Building..."

- stage: Test
  dependsOn: Build
  condition: eq(variables['Build.SourceBranch'], 'refs/heads/develop')
  jobs:
  - job: TestJob
    pool:
      vmImage: ubuntu-latest
    steps:
    - script: echo "Testing..."
```
Question 7mediummultiple choice
Full question →

Refer to the exhibit. An Azure DevOps pipeline has the YAML configuration shown. A developer creates a pull request from a feature branch to the develop branch. What will happen?

Exhibit

Refer to the exhibit.

```yaml
# azure-pipelines.yml
trigger:
  branches:
    include:
    - main
    - develop
pr:
  branches:
    include:
    - main

pool:
  vmImage: 'ubuntu-latest'

steps:
- script: echo "Building..."
```
Question 8hardmultiple choice
Full question →

Refer to the exhibit. A developer runs 'git log --oneline --graph --decorate' and sees the output. Which Git workflow does this history most closely represent?

Network Topology
$ git logonelinegraphdecorateRefer to the exhibit.```|/* m2n3o4p Initial commit
Question 9mediummultiple choice
Full question →

Refer to the exhibit. The pipeline YAML includes an Azure CLI script that sets an app setting on a Web App. The pipeline fails with an authentication error. What is the most likely cause?

Network Topology
resource-group rg-contosoname app-contososettings DEPLOYMENT_SLOT=productionRefer to the exhibit.```yaml# Azure CLI scriptecho "Setting environment variables"pipeline:- job: Deploypool:vmImage: 'ubuntu-latest'steps:```
Question 10mediummultiple choice
Full question →

Refer to the exhibit. You have a branch policy JSON for Azure Repos. Which statement about this policy is correct?

Exhibit

{"isDisabled":false,"isLocked":false,"isFrozen":false,"branch":"refs/heads/main","settings":{"scope":[{"refName":"refs/heads/main","matchKind":"Exact","repositoryId":"e6d5f8a1-..."}],"isBlocking":true,"isDeleted":false,"isEnabled":true,"isCommentRequired":true,"isResetOnSourcePush":false,"allowDeletions":false,"allowForcePush":false,"blockLastPusherReview":true,"requireApprovalCount":2,"requireMandatoryReviewers":true,"requireNoMergeConflict":true,"requireSquashMerge":false,"requireTransitionToApproved":true,"requiredReviewerIds":["a1b2c3d4-..."],"buildDefinitionId":1234,"queueOnSourceUpdateOnly":false,"manualQueueOnly":false,"triggeredBuilds":[],"automaticallyLinkedWorkItems":false,"displayName":"Main branch policy"}}
Question 11hardmultiple choice
Full question →

The exhibit shows a parameters file for an ARM template deployment. During a release pipeline, the deployment fails with the error 'The provided value for the template parameter 'sku' is not valid'. The ARM template defines the 'sku' parameter as an allowed value set of ['F1', 'D1', 'B1', 'S1']. What could be the issue?

Exhibit

Refer to the exhibit.

```json
{
  "parameters": {
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
      "appName": {
        "value": "myapp"
      },
      "location": {
        "value": "eastus"
      },
      "sku": {
        "value": "S1"
      }
    }
  }
}
```
Question 12mediummultiple choice
Full question →

Refer to the exhibit. A developer pushes a commit to a branch named 'feature/new-login'. Which of the following will occur?

Exhibit

# Azure DevOps pipeline YAML snippet
trigger:
  branches:
    include:
      - main
      - release/*
    exclude:
      - feature/*

pool:
  vmImage: 'ubuntu-latest'

steps:
- script: echo Hello, world!
  displayName: 'Run a one-line script'

- task: DotNetCoreCLI@2
  inputs:
    command: 'restore'
    projects: '**/*.csproj'

- task: DotNetCoreCLI@2
  inputs:
    command: 'build'
    projects: '**/*.csproj'

- task: DotNetCoreCLI@2
  inputs:
    command: 'test'
    projects: '**/*.csproj'
Question 13mediummultiple choice
Full question →

Refer to the exhibit. You run an ARM template deployment and get the error shown. What is the most likely cause?

Network Topology
az deployment group createresource-group rg1template-file template.json"id": "/subscriptions/.../resourceGroups/rg1/providers/Microsoft.Resources/deployments/azurecli...","properties": {"provisioningState": "Failed","error": {"code": "InvalidTemplateDeployment","details": ["code": "Conflict",
Question 14hardmultiple choice
Full question →

Refer to the exhibit. A release pipeline deploys this ARM template. The deployment fails with error: 'The template parameters 'adminPassword' is not a valid input.' What is the most likely cause?

Exhibit

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "location": {
      "type": "string",
      "defaultValue": "[resourceGroup().location]"
    },
    "vmSize": {
      "type": "string",
      "defaultValue": "Standard_DS2_v2"
    }
  },
  "resources": [
    {
      "type": "Microsoft.Compute/virtualMachines",
      "apiVersion": "2023-03-01",
      "name": "myVM",
      "location": "[parameters('location')]",
      "properties": {
        "hardwareProfile": {
          "vmSize": "[parameters('vmSize')]"
        },
        "osProfile": {
          "computerName": "myVM",
          "adminUsername": "azureuser",
          "adminPassword": "[parameters('adminPassword')]"
        }
      }
    }
  ]
}
Question 15mediummultiple choice
Full question →

Refer to the exhibit. A developer commits code to the 'develop' branch. The pipeline does not trigger. What is the most likely reason?

Network Topology
configuration $(buildConfiguration)'arguments: 'configuration $output $(Build.ArtifactStagingDirectory)'trigger:- mainpool:vmImage: 'ubuntu-latest'variables:buildConfiguration: 'Release'steps:- task: DotNetCoreCLI@2inputs:command: 'build'projects: '**/*.csproj'command: 'publish'publishWebProjects: truezipAfterPublish: true- task: PublishBuildArtifacts@1PathtoPublish: '$(Build.ArtifactStagingDirectory)'ArtifactName: 'drop'publishLocation: 'Container'

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.