AZ-400 Practice Question: Design and implement build and release pipelines
Your Azure Pipelines build uses a self-hosted agent that runs on a Windows VM. The build fails with the error 'Access to the path 'C:\agent\_work\1\s\bin' is denied.' What is the most likely cause?
⚠ Common exam trap
It's easy for candidates to confuse a permissions error with a file-locking error (Option C), but Azure Pipelines specifically uses distinct error messages for each scenario, and 'access denied' always points to NTFS permissions, not file locks.
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
✓
The agent service account does not have write permissions on the working directory
The error 'Access to the path ... is denied' indicates a permissions issue. Self-hosted agents run under a specific Windows service account (e.g., Network Service, Local System, or a custom domain account). If that account lacks write permissions on the working directory (e.g., `C:\agent\_work\1\s\bin`), the agent cannot create or modify files during the build, causing the failure. This is the most common cause when using self-hosted agents on Windows VMs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The agent service account does not have write permissions on the working directory
Why this is correct
The agent service account is the OS-level account under which the self-hosted agent process runs. When a pipeline job starts, the agent creates a working directory under its _work folder (e.g., _work/1/s) to clone the source and perform build outputs. If that account lacks write permissions (NTFS Modify or POSIX write/execute) on the working directory, any file creation or modification fails with an access-denied error—even though the agent itself successfully connected and started the job. To resolve this, grant the service account full control (Windows) or write+execute (Unix) on the entire _work directory.
- ✗
The agent is not configured to use the correct agent pool
Why it's wrong here
Incorrect agent pool selection would prevent the agent from picking up the job, but an access-denied error during the build indicates the agent is already running the job. Since the working directory is being written to, the agent has already been assigned from a valid pool, so this is not the cause of the failure.
- ✗
The build is trying to overwrite a file that is locked by another process
Why it's wrong here
A file lock typically produces a sharing violation error (e.g., "The process cannot access the file because it is being used by another process"), not an access-denied permission error. The symptom described is about permission to write, not concurrent access, so a locked file does not explain the failure.
- ✗
The source code checkout failed due to incorrect credentials
Why it's wrong here
Credential failures during checkout would occur in the repository source step and produce an authentication error (e.g., "Authentication failed" or "Host key verification failed"), before any file operations on the working directory. Since the error is about write access, not fetching sources, this is not the relevant cause.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Agent
An agent is a software component that runs on a local machine to perform automated tasks, collect data, or execute commands as part of a larger system like CI/CD or monitoring.
Key term
Azure Pipelines
Azure Pipelines is a cloud-based CI/CD service from Microsoft that automatically builds, tests, and deploys code to any platform or cloud.
About these practice questions
This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.