AZ-204 Professional Standards & Competencies 3 — Questions and Answers
Question 1: A developer is responsible for an Azure Cosmos DB application. Which professional competency ensures the application remains available during a regional outage?
- Enabling multi-region writes with automatic failover (Correct answer)
- Storing all data in a single partition key
- Disabling consistency levels for better performance
- Using the local emulator in production
Correct answer: Enabling multi-region writes with automatic failover
Multi-region writes with automatic failover ensure the application can serve traffic from a healthy region if one region becomes unavailable.
Question 2: As part of AZ-204 competency, a developer must handle token expiration gracefully in an app using MSAL. What is the correct approach?
- Prompt the user to log in every 60 minutes
- Use MSAL's AcquireTokenSilent to refresh tokens automatically from cache (Correct answer)
- Store the refresh token in a cookie and call it manually
- Disable token expiration in Azure AD app registration
Correct answer: Use MSAL's AcquireTokenSilent to refresh tokens automatically from cache
MSAL's AcquireTokenSilent method automatically retrieves valid tokens from cache or refreshes them silently, providing a seamless user experience.
Question 3: An Azure developer wants to validate API request payloads before they reach the backend. Which Azure API Management policy should they apply?
- rate-limit policy
- validate-content policy with a JSON schema (Correct answer)
- set-backend-service policy
- cache-lookup policy
Correct answer: validate-content policy with a JSON schema
The validate-content policy in API Management validates incoming request bodies against a defined JSON schema, rejecting malformed payloads early.
Question 4: A developer is designing retry logic for calls to an Azure Storage account. Which professional standard library should they use for automatic retries with exponential backoff?
- Custom Thread.Sleep loops in a catch block
- Azure SDK built-in retry policies via RetryOptions (Correct answer)
- A manual counter variable resetting after 3 attempts
- Disabling retries and alerting on every failure
Correct answer: Azure SDK built-in retry policies via RetryOptions
Azure SDKs provide built-in retry policies with configurable exponential backoff, eliminating the need for custom retry logic.
Question 5: An Azure developer must ensure sensitive data fields in Application Insights telemetry are not logged. Which feature accomplishes this?
- Disabling Application Insights entirely for production
- Using a TelemetryInitializer to redact or remove sensitive properties (Correct answer)
- Setting the sampling rate to 0%
- Storing telemetry in a private Blob container
Correct answer: Using a TelemetryInitializer to redact or remove sensitive properties
A TelemetryInitializer intercepts telemetry before it is sent and can remove or mask sensitive fields from all telemetry types.
Question 6: When deploying an Azure Container App, a developer wants to follow the 12-factor app methodology. Which practice is most aligned with this standard?
- Baking environment-specific config into the container image
- Storing config in environment variables injected at runtime (Correct answer)
- Using a single global config file shared across all environments
- Hard-coding connection strings in the application source code
Correct answer: Storing config in environment variables injected at runtime
The 12-factor app methodology requires strict separation of config from code, achieved by injecting configuration through environment variables.
Question 7: A developer needs to document API contracts for an Azure API Management-hosted API. Which industry-standard format should they use for the OpenAPI specification?
- A custom XML schema uploaded to Blob Storage
- An OpenAPI (Swagger) YAML or JSON definition imported into API Management (Correct answer)
- A Word document shared via SharePoint
- A SQL stored procedure that returns API metadata
Correct answer: An OpenAPI (Swagger) YAML or JSON definition imported into API Management
API Management natively supports importing and exporting OpenAPI YAML or JSON definitions, enabling standard contract-first API development.
A developer is responsible for an Azure Cosmos DB application.
Which professional competency ensures the application remains available during a regional outage?