Microsoft

AZ-204 Free Practice Questions — Page 15

Question 147

You are developing a web application that uses the Microsoft identity platform to authenticate users and resources. The web application calls several REST APIs. The APIs require an access token from the Microsoft identity platform. You need to request a token. Which three properties should you use? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

A. Redirect URI/URL
B. Application ID
C. Application name
D. Application secret
E. Supported account type
Show Answer
Correct Answer: A, B, D
Explanation:
To request an access token from the Microsoft identity platform, the application must identify itself and complete an OAuth 2.0 flow. The Application ID (client_id) identifies the app, the Application secret is used to authenticate the app in confidential client flows, and the Redirect URI is required in authorization code flows to return the authorization response securely. Application name and supported account type are configuration metadata and are not required parameters when requesting a token.

Question 148

You are developing an inventory tracking solution. The solution includes an Azure Function app containing multiple functions triggered by Azure Cosmos DB. You plan to deploy the solution to multiple Azure regions. The solution must meet the following requirements: • Item results from Azure Cosmos DS must return the most recent committed version of an item. • Items written to Azure Cosmos DB must provide ordering guarantees. You need to configure the consistency level for the Azure Cosmos DB deployments. Which consistency level should you use?

A. consistent prefix
B. eventual
C. bounded staleness
D. strong
E. session
Show Answer
Correct Answer: D
Explanation:
The requirements state that reads must always return the most recent committed version of an item and that writes must provide ordering guarantees. In Azure Cosmos DB, only Strong consistency provides linearizability, guaranteeing that every read returns the latest committed write and that write ordering is preserved. Other consistency levels (bounded staleness, consistent prefix, session, eventual) allow some level of staleness or relaxed ordering. Although strong consistency has limitations with multiple write regions, the question does not specify multiple write regions for Cosmos DB—only that the solution is deployed to multiple Azure regions—so Strong consistency is the correct choice.

Question 149

HOTSPOT - You are developing a static website hosted on Azure Blob Storage. You create a storage account and enable static website hosting. The website must support the following requirements: • Custom domain name • Custom header values for all responses • Custom SSL certificate You need to implement the static website. What should you configure? To answer, select the appropriate values in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-204 question 149
Show Answer
Correct Answer: Custom domain name: Azure Content Delivery Network (CDN) Custom header values: Azure Content Delivery Network (CDN) Custom SSL certificate: Azure Content Delivery Network (CDN)
Explanation:
Azure Blob Storage static websites do not natively support custom response headers or custom SSL certificates with custom domains. Azure CDN provides custom domain mapping, HTTPS with custom certificates, and rules to add or modify HTTP response headers for all responses.

Question 150

You develop and deploy a web app to Azure App Service. The Azure App Service uses a Basic plan in a single region. Users report that the web app is responding slow. You must capture the complete call stack to help identify performance issues in the code. Call stack data must be correlated across app instances. You must minimize cost and impact to users on the web app. You need to capture the telemetry. Which three actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

A. Restart all apps in the App Service plan.
B. Enable Application Insights site extensions.
C. Upgrade the Azure App Service plan to Premium.
D. Enable Profiler.
E. Enable the Always On setting for the app service.
F. Enable Snapshot debugger.
G. Enable remote debugging.
Show Answer
Correct Answer: B, D, E
Explanation:
To capture complete call stacks correlated across instances with minimal cost and user impact, use Application Insights with Profiler. Application Insights site extension enables telemetry collection and correlation. Profiler captures performance traces and call stacks for slow requests with low overhead. Always On is required for Profiler in App Service and prevents the app from unloading, ensuring consistent profiling. Snapshot Debugger targets exceptions, not performance analysis, and remote debugging or plan upgrades add cost or impact.

Question 151

HOTSPOT - You are developing a solution that uses several Azure Service Bus queues. You create an Azure Event Grid subscription for the Azure Service Bus namespace. You use Azure Functions as subscribers to process the messages. You need to emit events to Azure Event Grid from the queues. You must use the principal of least privilege and minimize costs. Which Azure Service Bus values should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-204 question 151
Show Answer
Correct Answer: Tier: Premium Access control (IAM) level: Contributor
Explanation:
Azure Service Bus to Event Grid integration is supported only on the Premium tier. Emitting events requires managing the Service Bus namespace integration, which needs Contributor permissions; data-plane roles (Sender/Receiver/Owner) are insufficient. This satisfies least privilege while enabling the integration.

Question 152

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. Authorization
B. WebHook-Request-Callback
C. Resource
D. WebHook-Request-Origin
Show Answer
Correct Answer: A
Explanation:
To protect an Azure Function from unauthorized or misconfigured invocations, the function must receive authentication information (function keys, host keys, or tokens). These credentials are carried in the standard HTTP Authorization header. When traffic passes through a CDN, this header must be explicitly allowed so it is forwarded to the function. The WebHook-Request-Origin header is only for webhook abuse protection (origin identification) and does not provide authentication or authorization.

Question 153

HOTSPOT - You develop and deploy an Azure App Service web app that connects to Azure Cache for Redis as a content cache. All resources have been deployed to the East US 2 region. The security team requires the following audit information 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 Cach3e for Redis instance was accessed. The audit information must be captured and analyzed by a security team application deployed to the Central US region. You need to log information on all client connections to the cache. Which configuration values should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-204 question 153
Show Answer
Correct Answer: Store log information: Log Analytics workspace Enable client connection logging: Diagnostic setting
Explanation:
Azure Cache for Redis uses Azure diagnostic settings to emit connection and operation logs. Log Analytics supports cross-region log ingestion and querying, allowing logs from East US 2 to be analyzed by a security application in Central US.

Question 154

You are developing several microservices to deploy to a new Azure Kubernetes Service cluster. The microservices manage data stored in Azure Cosmos DB and Azure Blob storage. The data is secured by using customer-managed keys stored in Azure Key Vault. You must automate key rotation for all Azure Key Vault keys and allow for manual key rotation. Keys must rotate every three months. Notifications of expiring keys must be sent before key expiry. You need to configure key rotation and enable key expiry notifications. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

A. Create and configure a new Azure Event Grid instance.
B. Configure Azure Key Vault alerts.
C. Create and assign an Azure Key Vault access policy.
D. Create and configure a key rotation policy during key creation.
Show Answer
Correct Answer: A, D
Explanation:
Azure Key Vault key rotation is configured by defining a key rotation policy, which enforces automatic rotation (for example, every three months) while still allowing manual rotation. Notifications for key lifecycle events such as near-expiry are delivered through Azure Event Grid integration with Key Vault, which is used to route expiry events to notification mechanisms. Key Vault alerts and access policies do not themselves configure rotation or expiry notifications.

Question 155

HOTSPOT - You are developing an online game that allows players to vote for their favorite photo that illustrates a word. The game is built by using Azure Functions and uses durable entities to track the vote count. The voting window is 30 seconds. You must minimize latency. You need to implement the Azure Function for voting. How should you complete the code? To answer, select the appropriate options in the answer area.

Illustration for AZ-204 question 155
Show Answer
Correct Answer: [DurableClient] IDurableEntityClient SignalEntityAsync
Explanation:
Durable entities are accessed via IDurableEntityClient. To minimize latency for a 30‑second voting window, use one‑way signaling (SignalEntityAsync) to increment the vote without waiting for a response.

Question 156

HOTSPOT - You provisioned an Azure Cosmos DB for NoSQL account named account1 with the default consistency level. You plan to configure the consistency level on a per request basis. The level needs to be set for consistent prefix for read and write operations to account1. You need to identify the resulting consistency level for read and write operations. Which levels should you configure? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-204 question 156
Show Answer
Correct Answer: Read operations: consistent prefix Write operations: session
Explanation:
The account uses the default consistency level (Session). Per-request overrides apply only to read operations and can only relax consistency. Therefore, reads can be set to Consistent Prefix, while writes always use the account default (Session).

$19

Get all 447 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.