Question 297 of 928
Design and implement build and release pipelineshardMultiple SelectObjective-mapped

What Are the Requirements to Set Up a Self-Hosted Agent in Azure Pipelines?

This AZ-400 practice question tests your understanding of design and implement build and release pipelines. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which THREE components are required to set up a self-hosted agent in Azure Pipelines? (Choose three.)

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

A personal access token (PAT) with Agent Pools (read, manage) scope

A personal access token (PAT) with Agent Pools (read, manage) scope is required because the self-hosted agent uses this token to authenticate with Azure DevOps during the configuration step. The agent registers itself into the specified agent pool, and the PAT must have the 'Agent Pools (read, manage)' scope to authorize this registration and subsequent communication.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • An Azure Resource Manager service connection

    Why it's wrong here

    Service connections are for cloud resources, not for agent registration.

  • A personal access token (PAT) with Agent Pools (read, manage) scope

    Why this is correct

    PAT is required for the agent to authenticate with Azure DevOps.

    Related concept

    Read the scenario before looking for a memorised answer.

  • A machine (virtual or physical) to run the agent software

    Why this is correct

    Self-hosted agents run on your own infrastructure.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The agent software downloaded from the Azure DevOps organization

    Why this is correct

    The agent package must be downloaded and configured.

    Related concept

    Read the scenario before looking for a memorised answer.

  • An Azure Active Directory account for the agent

    Why it's wrong here

    Agents do not require Azure AD accounts; they use PAT.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse a service connection (needed for deploying to Azure) with the authentication mechanism required to register the agent itself, leading them to select Option A instead of recognizing that only the PAT with Agent Pools scope is needed.

Detailed technical explanation

How to think about this question

During agent configuration, the PAT is used to call the Azure DevOps REST API (e.g., PUT to `/{organization}/_apis/distributedtask/pools/{poolId}/agents`) to register the agent. The agent then uses a long-lived OAuth token (obtained during configuration) for ongoing communication, not the PAT itself. In real-world scenarios, you must rotate PATs regularly and ensure the agent's service account has appropriate file system permissions for the agent's working directory.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

Visual reference

Inside (Private) PC-A 10.0.0.1 PC-B 10.0.0.2 NAT Router Outside (Public) 203.0.113.1 Inside Global Server PAT: many private IPs share one public IP via unique port numbers

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-400 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-400 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-400 question test?

Design and implement build and release pipelines — This question tests Design and implement build and release pipelines — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: A personal access token (PAT) with Agent Pools (read, manage) scope — A personal access token (PAT) with Agent Pools (read, manage) scope is required because the self-hosted agent uses this token to authenticate with Azure DevOps during the configuration step. The agent registers itself into the specified agent pool, and the PAT must have the 'Agent Pools (read, manage)' scope to authorize this registration and subsequent communication.

What should I do if I get this AZ-400 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on AZ-400

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which TWO conditions must be met for a self-hosted agent to be used in an Azure Pipelines agent pool? (Choose two.)

medium
  • A.The agent must be in the Default pool.
  • B.The agent must have network access to Azure Pipelines.
  • C.The agent must run on Windows Server.
  • D.The agent must be installed on a virtual machine.
  • E.The agent must be registered with the agent pool.

Why B: Option B is correct because a self-hosted agent must have outbound network connectivity to Azure Pipelines (specifically to the Azure DevOps service endpoints) in order to receive job assignments, download tasks, and report status. Without this network access, the agent cannot communicate with the orchestration layer and will remain offline. This is a fundamental requirement for any agent, whether hosted or self-hosted.

Variation 2. Which THREE are required to set up a self-hosted agent for Azure Pipelines?

hard
  • A.A virtual machine running in Azure.
  • B.Network connectivity to Azure DevOps services.
  • C.A Personal Access Token (PAT) to authenticate the agent.
  • D.An agent pool configured in Azure DevOps and the agent configured to use that pool.
  • E.Docker installed on the agent machine.

Why B: B is correct because the self-hosted agent must communicate with Azure Pipelines to receive job assignments and report status. This requires outbound HTTPS connectivity (port 443) to Azure DevOps services (e.g., dev.azure.com). Without network connectivity, the agent cannot register, poll for jobs, or send logs, making it non-functional.

Keep practising

More AZ-400 practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.