Microsoft AZ-204 Practice Exams
Last updated on Nov 16,2026- Exam Code: AZ-204
- Exam Name: Developing Solutions for Microsoft Azure
- Certification Provider: Microsoft
- Latest update: Nov 16,2026
You need to investigate the http server log output to resolve the issue with the ContentUploadService.
Which command should you use first?
- A . az webapp log
- B . az ams live-output
- C . az monitor activity-log
- D . az container attach
C
Explanation:
Scenario: Users of the ContentUploadService report that they occasionally see HTTP 502 responses on specific pages.
"502 bad gateway" and "503 service unavailable" are common errors in your app hosted in Azure App Service.
Microsoft Azure publicizes each time there is a service interruption or performance degradation.
The az monitor activity-log command manages activity logs.
Note: Troubleshooting can be divided into three distinct tasks, in sequential order:
✑ Observe and monitor application behavior
✑ Collect data
✑ Mitigate the issue
Reference: https://docs.microsoft.com/en-us/cli/azure/monitor/activity-log
DRAG DROP
You develop and deploy an Azure App Service —- app. The web app accesses data in an Azure SQL
database
You must update the web app to store frequently used data m a new Azure Cache for Redis Premium instance.
You need to implement the Azure Cache for Redis features.
Which feature should you implement? To answer, drag the appropriate feature to the correct requirements Each feature may be used once, more than once, or not at all You may need to ———— between panes or scroll to view content. NOTE Each correct selection is worth one point


DRAG DROP
You develop and deploy a web app to Azure App Service in a production environment. You scale out the web app to four instances and configure a staging slot to support changes.
You must monitor the web app in the environment to include the following requirements:
• Increase web app availability by re-routing requests away from instances with error status codes and automatically replace instances if they remain in an error state after one hour.
• Send web server logs, application logs, standard output and standard error messaging to an Azure Storage blob account.
You need to configure Azure App Service.
Which values should you use? To answer, drag the appropriate configuration value to the correct requirements. Each configuration value may be used once, more than….


HOTSPOT
ASP.NET Core API app by using C#. The API app will allow users to authenticate by using Twitter and Azure Active Directory (Azure AD).
Users must be authenticated before calling API methods. You must log the user’s name for each method call.
You need to configure the API method calls.
Which values should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Box 1: Authorize
Box 2: X-MS-CLIENT-PRINCIPAL-NAME
App Service passes user claims to your application by using special headers. External requests aren’t allowed to set these headers, so they are present only if set by App Service. Some example headers include:
X-MS-CLIENT-PRINCIPAL-NAME
X-MS-CLIENT-PRINCIPAL-ID
Here’s the set of headers you get from Easy Auth for a Twitter authenticated user:
{
"cookie": "AppServiceAuthSession=Lx43…xHDTA==",
…
"x-ms-client-principal-name": "evilSnobu",
"x-ms-client-principal-id": "35….",
"x-ms-client-principal-idp": "twitter",
"x-ms-token-twitter-access-token": "35…Dj",
"x-ms-token-twitter-access-token-secret": "OK3…Jx",
}
Reference: https://docs.microsoft.com/en-us/azure/app-service/app-service-authentication-how-to
DRAG DROP
A company has multiple warehouse. Each warehouse contains IoT temperature devices which deliver temperature data to an Azure Service Bus queue.
You need to send email alerts to facility supervisors immediately if the temperature at a warehouse goes above or below specified threshold temperatures.
Which five actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Explanation:
Step 1: Create a blank Logic app.
Create and configure a Logic App.
Step 2: Add a logical app trigger that fires when one or more messages arrive in the queue.
Configure the logic app trigger.
Under Triggers, select When one or more messages arrive in a queue (auto-complete).
Step 3: Add an action that reads IoT temperature data from the Service Bus queue
Step 4: Add a condition that compares the temperature against the upper and lower thresholds.
Step 5: Add an action that sends an email to specified personnel if the temperature is outside of those thresholds
Reference: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-monitoring-notifications-with-azure-logic-apps
You need to configure the ContentUploadService deployment.
Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
- A . Add the following markup to line CS23:
types: Private - B . Add the following markup to line CS24:
osType: Windows - C . Add the following markup to line CS24:
osType: Linux - D . Add the following markup to line CS23:
types: Public
A, C
Explanation:
Scenario: All Internal services must only be accessible from Internal Virtual Networks (VNets)
There are three Network Location types C Private, Public and Domain
Reference: https://devblogs.microsoft.com/powershell/setting-network-location-to-private/
HOTSPOT
A software as a service (SaaS) company provides document management services. The company has a service that consists of several Azure web apps. All Azure web apps run in an Azure App Service Plan named PrimaryASP.
You are developing a new web service by using a web app named ExcelParser. The web app contains
a third-party library for processing Microsoft Excel files. The license for the third-party library stipulates that you can only run a single instance of the library.
You need to configure the service.
How should you complete the script? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Reference: https://docs.microsoft.com/en-us/azure/app-service/manage-scale-per-app
Set the DataSources property of the SearchServiceClient.
Does the solution meet the goal?
- A . Yes
- B . No
B
Explanation:
Use the following method:
You a web application that provides access to legal documents that are stored on Azure Blob Storage with version level immutability policies. Documents are protected with both time-based policies legal hold policies. All time―based retention policies have AllowProtectedAppendWrites property enabled.
You have a requirement to prevent the user from attempting to perform operations that would fail only a legal is in effect and when all other are expired
You reed to meet the requirement.
Which two operations you prevent?
- A . overwriting existing
- B . adding data to documents
- C . deleting documents
- D . creating document
You a web application that provides access to legal documents that are stored on Azure Blob Storage with version level immutability policies. Documents are protected with both time-based policies legal hold policies. All time―based retention policies have AllowProtectedAppendWrites property enabled.
You have a requirement to prevent the user from attempting to perform operations that would fail only a legal is in effect and when all other are expired
You reed to meet the requirement.
Which two operations you prevent?
- A . overwriting existing
- B . adding data to documents
- C . deleting documents
- D . creating document