Microsoft

AZ-204 Free Practice Questions — Page 20

Question 201

You are developing an Azure Function that calls external APIs by providing an access token for the API. The access token is stored in a secret named token in an Azure Key Vault named mykeyvault. You need to ensure the Azure Function can access to the token. Which value should you store in the Azure Function App configuration?

A. KeyVault:mykeyvault;Secret:token
B. App:Settings:Secret:mykeyvault:token
C. AZUREKVCONNSTR_ https://mykeyveult.vault.ezure.net/secrets/token/
D. @Microsoft.KeyVault(SecretUri=https://mykeyvault.vault.azure.net/secrets/token/)
Show Answer
Correct Answer: D
Explanation:
Azure Functions (like App Service) support Key Vault references directly in application settings using the @Microsoft.KeyVault(...) syntax. Storing @Microsoft.KeyVault(SecretUri=https://mykeyvault.vault.azure.net/secrets/token/) allows the Function App to automatically resolve the secret value at runtime using its managed identity. The other options do not match the supported Key Vault reference format for Function App configuration.

Question 202

An organization hosts web apps in Azure. The organization uses Azure Monitor. You discover that configuration changes were made to some of the web apps. You need to identify the configuration changes. Which Azure Monitor log should you review?

A. AppServiceAppLogs
B. AppServiceEnvironmentPlatformlogs
C. AppServiceConsoleLogs
D. AppServiceAuditLogs
Show Answer
Correct Answer: B
Explanation:
To identify configuration changes to Azure App Service web apps, you must review logs that record platform-level actions. AppServiceEnvironmentPlatformLogs capture App Service platform events such as scaling operations, configuration changes, and service status. The other options log application output, console output, or user access events, not configuration changes. Therefore, AppServiceEnvironmentPlatformLogs is the correct log to review.

Question 203

You develop and deploy an Azure App Service web app. The app is deployed to multiple regions and uses Azure Traffic Manager. Application Insights is enabled for the app. You need to analyze app uptime for each month. Which two solutions will achieve the goal? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

A. Azure Monitor logs
B. Application Insights alerts
C. Azure Monitor metrics
D. Application Insights web tests
Show Answer
Correct Answer: A, C
Explanation:
To analyze application uptime on a monthly basis, you need historical, queryable availability data. Azure Monitor logs allow you to query Application Insights availability and request telemetry using KQL to calculate uptime percentages over monthly periods. Azure Monitor metrics provide built‑in availability and health metrics (including App Service and Traffic Manager health) that can be aggregated over time, making them suitable for monthly uptime analysis. Application Insights alerts are for notifications, not analysis, and web tests are a monitoring mechanism rather than an analysis tool by themselves.

Question 204

HOTSPOT - You are developing a C++ application that compiles to a native application named process.exe. The application accepts images as input and returns images in one of the following image formats: GIF, PNG, or JPEG. You must deploy the application as an Azure Function. You need to configure the function and host json files. How should you complete the json files? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

Illustration for AZ-204 question 204
Show Answer
Correct Answer: Box 1: "type": "http" Box 2: "customHandler" Box 3: "enableForwardingHttpRequest": true
Explanation:
C++ is not a supported Azure Functions runtime, so the function must use a custom handler that runs the native executable (process.exe). The function is HTTP-triggered to receive and return images. Setting enableForwardingHttpRequest to true forwards the raw HTTP request/response directly to the custom handler, which is required for a native image-processing executable.

Question 206

You are building a loyalty program for a major snack producer. When customers buy a snack at any of 100 participating retailers the event is recorded in Azure Event Hub. Each retailer is given a unique identifier that is used as the primary identifier for the loyalty program. Retailers must be able to be added or removed at any time. Retailers must only be able to record sales for themselves. You need to ensure that retailers can record sales. What should you do?

A. Use publisher policies for retailers.
B. Create a partition for each retailer.
C. Define a namespace for each retailer.
Show Answer
Correct Answer: A
Explanation:
Azure Event Hubs publisher policies allow you to create per-publisher (per-retailer) send-only access using unique publisher identifiers. This ensures each retailer can only send events on behalf of itself, while allowing retailers to be added or removed dynamically without changing partitions or namespaces. Partitions are fixed at creation time, and separate namespaces per retailer are unnecessary and impractical.

Question 207

You are developing an application to transfer data between on-premises file servers and Azure Blob storage. The application stores keys, secrets, and certificates in Azure Key Vault and makes use of the Azure Key Vault APIs. You want to configure the application to allow recovery of an accidental deletion of the key vault or key vault objects for 90 days after deletion. What should you do?

A. Run the Add-AzKeyVaultKey cmdlet.
B. Run the az keyvault update --enable-soft-delete true --enable-purge-protection true CLI.
C. Implement virtual network service endpoints for Azure Key Vault.
D. Run the az keyvault update --enable-soft-delete false CLI.
Show Answer
Correct Answer: B
Explanation:
To allow recovery of a deleted Azure Key Vault or its objects for up to 90 days, you must enable soft delete and purge protection on the vault. Soft delete retains deleted vaults and objects in a recoverable state for the retention period, while purge protection prevents permanent deletion until that period expires. The Azure CLI command in option B enables both features, meeting the requirement.

Question 208

You are developing an Azure-based web application. The application goes offline periodically to perform offline data processing. While the application is offline, numerous Azure Monitor alerts fire which result in the on-call developer being paged. The application must always log when the application is offline for any reason. You need to ensure that the on-call developer is not paged during offline processing. What should you do?

A. Add Azure Monitor alert processing rules to suppress notifications.
B. Disable Azure Monitor Service Health Alerts during offline processing.
C. Create an Azure Monitor Metric Alert.
D. Build an Azure Monitor action group that suppresses the alerts.
Show Answer
Correct Answer: A
Explanation:
Azure Monitor alert processing rules are designed to suppress or modify notifications during specific conditions such as planned maintenance or offline processing. They allow alerts to continue firing and being logged while preventing action groups (paging the on-call developer) from being triggered during the offline window. Other options either disable the wrong type of alerts or cannot selectively suppress notifications.

Question 209

A company maintains multiple web and mobile applications. Each application uses custom in-house identity providers as well as social identity providers. You need to implement single sign-on (SSO) for all the applications. What should you do?

A. Use Azure Active Directory B2C (Azure AD B2C) with custom policies.
B. Use Azure Active Directory B2B (Azure AD B2B) and enable external collaboration.
C. Use Azure Active Directory B2C (Azure AD B2C) with user flows.
D. Use Azure Active Directory B2B (Azure AD B2B).
Show Answer
Correct Answer: A
Explanation:
The scenario is customer-facing SSO across multiple web and mobile apps using both social identity providers and custom in-house identity providers. Azure AD B2C is designed for this purpose. User flows support common providers but have limited extensibility. Custom in-house identity providers and complex federation/claims transformations require Azure AD B2C custom policies. Azure AD B2B is for partner/guest access between organizations, not for authenticating customers across apps.

Question 210

DRAG DROP - An organization has web apps hosted in Azure. The organization wants to track events and telemetry data in the web apps by using Application Insights. You need to configure the web apps for Application Insights. Which three 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. Select and Place:

Illustration for AZ-204 question 210
Show Answer
Correct Answer: Create an Application Insights resource Copy the connection string Configure the Application Insights SDK in the app
Explanation:
First create the Application Insights resource to receive telemetry. Then copy its connection string to identify the target resource. Finally, configure the Application Insights SDK in the web app to send events and telemetry using that connection string.

Question 211

You are building a web application that uses the Microsoft identity platform for user authentication. You are implementing user identification for the web application. You need to retrieve a claim to uniquely identify a user. Which claim type should you use?

A. aud
B. nonce
C. oid
D. idp
Show Answer
Correct Answer: C
Explanation:
The oid (Object ID) claim is an immutable, unique identifier assigned by Azure AD to a user or service principal. It remains constant for the lifetime of the object within a tenant and is specifically intended to uniquely identify users across sessions and applications. Other claims like aud, nonce, and idp do not uniquely identify a user.

$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.