AZ-400 Practice Question: Design and implement build and release pipelines
Which TWO are best practices for securing Azure Pipelines? (Choose two.)
⚠ Common exam trap
The trap is thinking that scoping service connections to specific resource groups with 'Contributor' role is too permissive. While 'Contributor' is broader than a custom role, Microsoft recommends it for resource group-scoped connections because it provides the minimum permissions needed for most Azure DevOps tasks without overcomplicating management. The real risk is using overly broad scopes like subscriptions or 'Owner' roles, not 'Contributor' on specific resource groups.
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
✓
Use variable groups linked to Azure Key Vault for secrets.
Variable groups linked to Azure Key Vault allow you to securely store and manage secrets (e.g., API keys, passwords) outside of pipeline definitions. Azure Pipelines retrieves these secrets at runtime via the Azure Key Vault REST API, ensuring they are never exposed in logs or YAML files. This follows the principle of least privilege and secrets management best practices.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use variable groups linked to Azure Key Vault for secrets.
Why this is correct
Key Vault integration securely stores and retrieves secrets.
- ✓
Scope service connections to specific resource groups with 'Contributor' role.
Why this is correct
Scoping limits the impact of a compromised connection.
- ✗
Grant 'Administrator' role to all service connections for ease of management.
Why it's wrong here
Least privilege should be applied.
- ✗
Store all pipeline variables in the YAML file as plain text.
Why it's wrong here
Plain text exposes secrets.
- ✗
Disable pipeline logging for all jobs.
Why it's wrong here
Logging is important for auditing and debugging.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Azure Key Vault
Azure Key Vault is a cloud service for securely storing and managing sensitive information like passwords, encryption keys, and certificates.
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
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.