nerdexam
Microsoft

AZ-400 · Question #439

Drag and Drop Question You have an Azure Pipeline. You need to store configuration values as variables. At which four scopes can the variables be defined, and what is the precedence of the variables f

The correct answer is job; stage; pipeline root; pipeline settings UI. In Azure Pipelines, variables can be defined at four scopes with the following precedence (highest to lowest): job, stage, pipeline root, and pipeline settings UI. A variable defined at a more specific/inner scope (like job) overrides the same variable defined at a broader/outer

Submitted by kevin_r· Mar 6, 2026Implement and manage build and release pipelines - specifically configuring and managing pipeline variables and their scope/precedence in Azure DevOps

Question

Drag and Drop Question You have an Azure Pipeline. You need to store configuration values as variables. At which four scopes can the variables be defined, and what is the precedence of the variables from the highest precedence to lowest precedence? To answer, move the appropriate scope from the list of scopes to the answer area and arrange them in the correct order. Answer:

Exhibit

AZ-400 question #439 exhibit

Answer Area

Drag items

stagejobpipeline settings UIpipeline roottask

Correct arrangement

  • job
  • stage
  • pipeline root
  • pipeline settings UI

Explanation

In Azure Pipelines, variables can be defined at four scopes with the following precedence (highest to lowest): job, stage, pipeline root, and pipeline settings UI. A variable defined at a more specific/inner scope (like job) overrides the same variable defined at a broader/outer scope (like pipeline root or pipeline settings UI), following the principle that the most local definition wins. The pipeline settings UI (variable groups or variables set in the Azure DevOps portal) has the lowest precedence and can be overridden by any inline variable definition in the YAML file.

Topics

#Azure Pipelines#Variable Scoping#CI/CD Configuration#YAML Pipelines

Community Discussion

No community discussion yet for this question.

Full AZ-400 Practice