AZ-204 Develop Azure compute solutions Practice Question
Network Topology
Refer to the exhibit. You run this Azure CLI command to configure an Azure Web App for Containers. The web app fails to start, and the logs show 'unauthorized: authentication required'. What is the most likely cause?
⚠ Common exam trap
Candidates often assume the 'latest' tag always exists or that the registry URL is the only configuration needed, overlooking that private registries require explicit authentication credentials or managed identity setup.
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 command did not include admin credentials or managed identity configuration
The Azure CLI command `az webapp config container set` without specifying `--docker-registry-server-user` and `--docker-registry-server-password` (or a managed identity configuration) means the web app cannot authenticate with a private container registry. The 'unauthorized: authentication required' error indicates the registry requires credentials, and the web app has none configured, so it fails to pull the image.
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 command did not include admin credentials or managed identity configuration
Why this is correct
The error likely indicates an unauthorized or access denied issue when the Azure Web App attempts to pull the Docker image from the Azure Container Registry (ACR). To successfully pull images from a private registry like ACR, the web app requires explicit authentication. This can be achieved by providing ACR admin credentials (username and password) via application settings or by configuring a system-assigned or user-assigned managed identity with AcrPull role permissions on the ACR. Without either method, the pull operation will fail due to lack of authorization.
- ✗
The image tag 'latest' does not exist
Why it's wrong here
While it's possible for an image tag like 'latest' to not exist, the specific error message typically associated with a missing tag would be something like 'manifest unknown' or 'image not found'. An authentication error, such as 'unauthorized' or 'access denied', explicitly points to a problem with the web app's ability to log in or gain permission to the registry, not the non-existence of the image itself. Therefore, the issue is not about the image's presence but the web app's access rights.
- ✗
The web app is configured to use a deployment slot, but the slot is not specified
Why it's wrong here
Azure App Service deployment slots are used for staging and testing new versions of an application before swapping them into production. While deployment slots are a critical feature for managing application lifecycle, they are entirely separate from the mechanism by which an Azure Web App authenticates to a private container registry. The authentication failure occurs at the registry access level, irrespective of whether the web app is running in a production slot or a staging slot. Specifying a slot would not resolve an underlying authentication issue.
- ✗
The --docker-registry-server-url is incorrect
Why it's wrong here
The standard URL format for an Azure Container Registry (ACR) is `yourregistryname.azurecr.io`. Assuming `yourregistryname` is replaced with the actual name of the ACR, this URL format is correct and widely used for accessing images. If the URL itself were malformed or pointed to a non-existent server, the error would likely be a network connection issue or a host resolution failure, not an authentication failure. The problem lies with the credentials for accessing the specified registry, not the registry's address itself.
Go deeper
Related to this question
Learn chapter
Azure Functions Development
Key term
Container registry
A container registry is a centralized storage and distribution system for container images, enabling developers to push, pull, and manage versions of application snapshots across environments.
Key term
Managed identity
A managed identity is an automatically managed service principal in Azure that allows your code to authenticate to any service that supports Azure AD authentication without storing credentials.
About these practice questions
One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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-204 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-204 exam.