Practice Free AZ-204 Exam Online Questions
HOTSPOT
You plan to implement an Azure function named Function1 that will use the timer trigger.
You plan to use a TimeSpan value to set the schedule of function execution.
You need to select the hosting model and the schedule expression assignment method.
Which hosting model and schedule expression assignment method should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.


You provide an Azure API Management managed web service lo clients. The back end web service implements HTTP Strict Transport Security (HSTS).
Every request to the backend service must include a valid HTTP authorization header.
You need to configure the Azure API Management instance with an authentication policy.
Which two policies can you uses? Each correct answer presents a complete solution
NOTE: Each correct selection is worth one point.
- A . Certificate Authentication
- B . Basic Authentication
- C . OAuth Client Credential Grant
- D . Digest Authentication
You are building an application to track cell towers that are available to phones in near real time. A phone will send information to the application by using the Azure Web PubSub service. The data will be processed by using an Azure Functions app. Traffic will be transmitted by using a content delivery network (CDN).
The Azure function must be protected against misconfigured or unauthorized invocations. You need to ensure that the CDN allows for the Azure function protection.
Which HTTP header should be on the allowed list?
- A . WebHook-Request-Origin
- B . Resource
- C . Authorization
- D . WebHook-Reauest-Callbackuirements
You are developing an online game that includes a feature that allows players to interact with other players on the same team within a certain distance. The calculation to determine the players in range occurs when players move and are cached in an Azure Cache for Redis instance.
The system should prioritize players based on how recently they have moved and should not prioritize players who have logged out of the game. You need to select an eviction policy.
Which eviction policy should you use?
- A . volatile-lru
- B . alllceys-lfu
- C . allkeys-lru
- D . volatile-ttl
HOTSPOT
You need to implement the Log policy.
How should you complete the EnsureLogging method in EventGridController.cs? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Box 1: logdrop
All log files should be saved to a container named logdrop.
Box 2: 15
Logs must remain in the container for 15 days.
Box 3: UpdateApplicationSettings
All Azure App Service Web Apps must write logs to Azure Blob storage.
Reference: https://blog.hompus.nl/2017/05/29/adding-application-logging-blob-to-a-azure-web-app-service-using-powershell/
HOTSPOT
You develop and deploy an Azure App Service web app that connects to Azure Cache for Redis as a content cache. An resources have been deployed to East US 2 region.
The security team requires the from Azure Cache for Redis:
The number of Redis client connections from an associated IP address.
Redis operations completed on the content cache.
The location (region) in which the Azure Cache for Redis instance was accessed.
The audit information must be captured and analyzed by a security team application deployed to Central US region
You need to log information on all client corrections to the cache.
Which configuration values should you use?


DRAG DROP
You manage an Azure subscription associated with a Microsoft Entra tenant named contoso.com. The subscription contains an Azure Bl account has the Contributor Azure role-based access control (RBAC) role within the scope of the subscription.
You plan to implement secure access to containers and blobs in storage 1.
Your solution must satisfy the following requirements:
• Authorization requests to access storage! content must be authenticated by using Microsoft Entra credentials.
• Authorized access to storage1 content must be time-limited based on arbitrary values specified when requests are raised.
• The principle of least privilege must be satisfied.
You need to implement the plan.
Which three actions should you perform in sequence? To answer, move the appropriate secure access implementation options from the list of secure access implementations to the answer area and arrange them in the correct order.


You need to ensure that the solution can meet the scaling requirements for Policy Service.
Which Azure Application Insights data model should you use?
- A . an Application Insights dependency
- B . an Application Insights event
- C . an Application Insights trace
- D . an Application Insights metric
D
Explanation:
Application Insights provides three additional data types for custom telemetry:
Trace – used either directly, or through an adapter to implement diagnostics logging using an instrumentation
framework that is familiar to you, such as Log4Net or System.Diagnostics.
Event – typically used to capture user interaction with your service, to analyze usage patterns.
Metric – used to report periodic scalar measurements.
Scenario:
Policy service must use Application Insights to automatically scale with the number of policy actions that it is performing.
Reference: https://docs.microsoft.com/en-us/azure/azure-monitor/app/data-model
Call the Documents.Suggest method of the SearchIndexClient and pass the DataSource.
Does the solution meet the goal?
- A . Yes
- B . No
B
Explanation:
Use the following method:
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop and deploy an Azure App Service API app to a Windows-hosted deployment slot named Development. You create additional deployment slots named Testing and Production. You enable auto swap on the Production deployment slot.
You need to ensure that scripts run and resources are available before a swap operation occurs.
Solution: Update the web.config file to include the applicationInitialization configuration element.
Specify custom initialization actions to run the scripts.
Does the solution meet the goal?
- A . Yes
- B . No
A
Explanation:
Specify custom warm-up.
Some apps might require custom warm-up actions before the swap. The application Initialization configuration element in web.config lets you specify custom initialization actions. The swap operation waits for this custom warm-up to finish before swapping with the target slot. Here’s a sample web.config fragment.
<system.webServer>
<applicationInitialization>
<add initializationPage="/" hostName="[app hostname]" />
<add initializationPage="/Home/About" hostName="[app hostname]" />
</applicationInitialization>
</system.webServer>
Reference: https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#troubleshoot-swaps
