AZ-400 Practice Question: Design and implement build and release pipelines
Network Topology
Refer to the exhibit. The workflow runs successfully but the deployment fails because the Azure CLI is not authenticated. What should you add to the workflow to authenticate?
⚠ Common exam trap
Many candidates assume any Azure action (like 'azure/webapps-deploy') implicitly handles authentication, but in reality, authentication must be explicitly performed before any Azure CLI or SDK calls.
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
✓
Add the 'azure/login' action with Azure credentials
The Azure CLI in the workflow requires authentication to interact with Azure resources. Adding the 'azure/login' action with valid Azure credentials (e.g., service principal secrets or OpenID Connect) establishes the necessary authentication context before any Azure CLI commands are executed, resolving the 'not authenticated' error.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add the 'azure/login' action with Azure credentials
Why this is correct
Adding the 'azure/login' action with Azure credentials is correct because it authenticates the Azure CLI with a service principal, establishing an Azure session (via the `AZURE_CREDENTIALS` secret containing client ID, client secret, tenant ID, and subscription ID) that subsequent steps can use to run `az` commands. Without this authentication step, any Azure CLI command in the workflow fails with an authentication error, even if the workflow itself runs successfully.
- ✗
Add the 'actions/setup-node' action
Why it's wrong here
The 'actions/setup-node' action only installs and configures a specified version of Node.js in the runner environment. It does not interact with Azure or establish any kind of Azure Active Directory/Microsoft Entra ID session, so it cannot resolve the authentication failure that occurs when the workflow tries to execute Azure CLI commands.
- ✗
Add the 'azure/webapps-deploy' action
Why it's wrong here
The 'azure/webapps-deploy' action is used to deploy an application to an existing Azure Web App, but it requires an already-authenticated Azure session (typically established by a prior 'azure/login' step). It performs deployment operations only and does not handle authentication, so adding it alone would still result in the same authentication failure for the Azure CLI commands.
- ✗
Add the 'actions/github-script' action to use the GitHub token
Why it's wrong here
The `actions/github-script` action executes JavaScript and can use the `github.token` context, but that token is scoped only to the GitHub repository and has no permissions against Azure resources. The deployment fails because the Azure CLI requires an authenticated session with Microsoft Entra ID, which the GitHub token cannot provide. This option is tempting because `github-script` is commonly used to interact with the GitHub API, and developers may mistakenly assume its token extends to external cloud services. It would be correct for tasks like creating a GitHub issue or comment, where repository-scoped authentication suffices.
Visual reference
Go deeper
Related to this question
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.