A DevOps team uses Azure DevOps pipelines. How should Key Vault secrets be accessed in pipeline tasks?
- A Hard-code secrets in pipeline YAML
- B Use the Azure Key Vault task with a service connection; secrets are loaded as pipeline variables (correct answer)
- C Check secrets into source control encrypted
- D Store secrets in Azure DevOps variable groups without Key Vault
Shortcut: The Azure Key Vault pipeline task fetches secrets at runtime using a service connection (or managed identity for hosted agents) and makes them available as masked pipeline variables.