Search Tutorials


AZ-204 Practice Test 4 | Developing Azure Solutions | JavaInUse

AZ-204 Developing Azure Solutions - Practice Test 4

Your Progress

0 / 50
Question 1MEDIUM
You are building a multi-container application on Azure Container Instances using a YAML configuration file. You need to define resource requests for CPU and memory for each container. Where in the YAML do you specify resource requests?
In an ACI YAML file, each container definition has a resources section with requests for CPU and memoryInGB. This is specified per container, not at the top level (A), not under image (B), and not under volumes (D). See more: Containers
Question 2MEDIUM
You are developing an application that uses Cosmos DB with the SQL API. Your query needs to perform a cross-partition query that returns aggregated results. Which is true about request unit (RU) consumption?
Cross-partition queries fan out to multiple physical partitions, each consuming RUs independently. The total RU charge is the sum across all partitions queried. Single-partition queries (A) are cheaper. Aggregations (C) consume RUs. Cross-partition queries are supported (D). See more: CosmosDB
Question 3EASY
You need to create an Azure Function that runs every day at 3:00 AM UTC. Which CRON expression should you use?
Azure Functions uses a 6-field CRON format: {second} {minute} {hour} {day} {month} {day-of-week}. "0 0 3 * * *" means second 0, minute 0, hour 3, every day. Option B fires at minute 3 every hour. Option C fires at second 3. Option D fires every second at 3 AM. See more: Function App
Question 4MEDIUM
You need to implement Azure Blob Storage static website hosting for a single-page application. When a user navigates to a route like /about, the server returns 404. How do you fix the routing?
For SPAs, set the error document path (404 page) to index.html. When Azure Storage cannot find /about, it serves index.html, and the SPA router handles the route client-side. Physical files (A) do not scale. Storage does not support rewrites (B). CORS (C) is for cross-origin requests. See more: Azure Storage Accounts
Question 5MEDIUM
You are implementing Microsoft Graph API to read a user's calendar events. The application uses delegated permissions. Which permission scope is required?
Calendars.Read with delegated permission allows the app to read the signed-in user's calendar events. Calendars.ReadWrite.All (A) is an application permission that grants access to all users' calendars. User.Read (B) provides basic profile info. Mail.Read (D) is for email. See more: Azure Authentication
Question 6MEDIUM
You are implementing Azure Key Vault secrets with a .NET application. You want the application to automatically reload configuration when a secret changes. Which approach should you use?
Azure App Configuration with Key Vault references and a sentinel key enables dynamic refresh. When the sentinel key changes, the configuration provider reloads all values including Key Vault references. Frequent polling (A) is expensive and may hit rate limits. Scheduled restarts (C) causes downtime. Event Grid (D) works but requires more infrastructure. See more: Data Encryption
Question 7MEDIUM
You are configuring Application Insights to track user behavior across pages. You want to see how users navigate through your web application. Which feature should you use?
User Flows in Application Insights visualizes how users navigate between pages and events in your web application. It shows paths users take and where they drop off. Metrics Explorer (B) shows metric charts. Transaction Search (C) finds individual telemetry items. Failures (D) shows error information. See more: Application Insights
Question 8MEDIUM
You are configuring Azure Service Bus message forwarding. You want messages from Queue A to be automatically forwarded to Queue B after successful processing. Which feature accomplishes this?
Auto-forwarding automatically forwards messages from one queue or subscription to another queue or topic. Dead-letter forwarding (A) handles failed messages. Message sessions (B) provide ordered processing. Duplicate detection (C) prevents duplicate messages. See more: Application Messaging
Question 9EASY
You are developing an Azure Function and need to read the connection string for a Cosmos DB output binding. The connection string is stored in application settings as "CosmosDBConnection". How do you reference it in the binding configuration?
The connection property in Azure Functions bindings takes the name of an application setting (not the value itself). The runtime resolves the setting name to its value. Pasting the string directly (A) is insecure. Key Vault reference (B) is for app settings, not bindings. %% syntax (D) is used for some properties but not connection. See more: Function App
Question 10HARD
You are implementing Cosmos DB with the SQL API. You need to run a query that returns items from two different collections using a JOIN. Can you perform a cross-collection JOIN in Cosmos DB SQL API?
Cosmos DB SQL API JOIN is limited to intra-document joins - joining a document root with its nested arrays or sub-documents. There are no cross-collection or cross-document joins. You must denormalize data or perform joins in application code. See more: CosmosDB
Question 11MEDIUM
You are configuring Azure App Service deployment slots. You need to ensure that certain settings remain with the slot and do not swap. What is the term for settings that stay with the slot?
Slot settings (also called deployment slot settings or sticky settings) are application settings or connection strings that stay with the slot during a swap. Mark a setting as a "deployment slot setting" in the Azure portal to make it sticky. See more: Containers
Question 12MEDIUM
You need to implement Azure Blob Storage client-side encryption. The encryption key is managed by the customer. Which approach should you use?
The Azure Storage SDK supports client-side encryption where data is encrypted before upload and decrypted after download. Keys can be stored in Key Vault. TDE (A) is for databases. Server-side CMK (B) encrypts at rest on the server. Infrastructure encryption (C) is server-side double encryption. See more: Azure Storage Accounts
Question 13MEDIUM
You are implementing Microsoft Graph change notifications. You want to be notified when a user's mailbox receives a new email. What is the maximum subscription lifetime for mail change notifications?
Microsoft Graph mail change notification subscriptions have a maximum lifetime of 4230 minutes (about 2.94 days). You must renew the subscription before it expires. 30 minutes (A) and 1 hour (B) are too short. Subscriptions are not unlimited (D). See more: Consuming Azure Services
Question 14MEDIUM
You are implementing Event Hub processing with the EventProcessorClient. You need to checkpoint after processing each batch of events. Why is checkpointing important?
Checkpointing saves the offset or sequence number of the last successfully processed event. If the consumer restarts, it resumes from the checkpointed position instead of reprocessing all events. Events are not deleted by checkpointing (A). It does not compress data (C) or notify producers (D). See more: Event-Based Solutions
Question 15EASY
You need to use Microsoft Entra ID to protect an Azure Function HTTP trigger. Which feature provides built-in authentication without modifying function code?
App Service Authentication (Easy Auth) provides built-in Microsoft Entra ID authentication for Azure Functions without code changes. It intercepts requests at the platform level. Function keys (B) are not identity-based. IP restrictions (C) limit by network. VNet integration (D) is for network connectivity. See more: Azure Authentication
Question 16MEDIUM
Your Azure Key Vault is configured with a firewall that allows access only from specific VNets. Your Azure DevOps pipeline needs to access secrets during deployment. What should you configure?
Enabling "Allow trusted Microsoft services to bypass this firewall" allows Azure services like Azure DevOps to access Key Vault without being in the VNet. Adding IP ranges (A) is difficult as they change. Disabling the firewall (B) is insecure. A self-hosted agent (D) works but adds complexity. See more: Data Encryption
Question 17MEDIUM
You need to implement Azure Cosmos DB conflict resolution for multi-region writes. Two regions update the same document simultaneously. Which conflict resolution mode uses a custom stored procedure?
The Custom conflict resolution policy uses a registered stored procedure (UDF) to resolve conflicts programmatically. Last Writer Wins (A) uses a timestamp. Manual resolution (C) is not a built-in mode. Automatic merge (D) is not a Cosmos DB feature. See more: CosmosDB
Question 18MEDIUM
You are deploying an Azure Container App revision. You need to split traffic between two revisions: 80% to the stable version and 20% to the new version. What feature allows you to control this?
Azure Container Apps supports traffic splitting between revisions by configuring traffic weights. You can assign weight percentages to active revisions for canary or blue/green deployments. Scaling (B) controls instance count. Docker builds (C) are for image creation. ACR webhooks (D) trigger on image push. See more: Containers
Question 19MEDIUM
You are implementing Azure API Management policies. You need to set a custom response header to include the API version. In which policy section should you add the set-header policy?
To set a response header, use set-header in the outbound section, which processes the response before returning it to the client. Inbound (A) processes incoming requests. Backend (B) processes before forwarding to the backend. On-error (C) handles error scenarios. See more: Consuming Azure Services
Question 20MEDIUM
You are configuring Azure Event Grid dead-lettering. Failed events should be stored in a blob container for later analysis. Which configuration is required?
Dead-lettering in Event Grid is configured on the event subscription by specifying a storage account and container as the dead-letter destination. It is not on the topic (A). Service Bus dead-letter (B) is a different service. An Azure Function (D) adds unnecessary complexity. See more: Event-Based Solutions
Question 21EASY
You need to configure CORS (Cross-Origin Resource Sharing) for an Azure App Service web API. Where do you configure the allowed origins?
Azure App Service provides CORS configuration in the portal (or via CLI/ARM) where you specify allowed origins. This is handled at the platform level before reaching application code. Code-only (A) works but platform CORS is preferred. DNS (C) and storage (D) are unrelated. See more: Consuming Azure Services
Question 22MEDIUM
You are implementing Azure Storage account encryption. By default, what encryption is applied to data at rest?
Azure Storage automatically encrypts all data at rest using 256-bit AES encryption with Microsoft-managed keys. This is enabled by default and cannot be disabled. You can optionally switch to customer-managed keys. 128-bit (B) is incorrect. No encryption (C) is wrong. RSA (D) is not used for data encryption. See more: Azure Storage Accounts
Question 23MEDIUM
You are developing a Durable Functions orchestration that calls multiple sub-orchestrations. One of the sub-orchestrations needs to run for an extended period. What is the recommended pattern for long-running orchestrations?
Eternal orchestrations use ContinueAsNew to reset the orchestration history periodically, preventing history table growth for long-running processes. Increasing timeout (A) does not address history growth. Consumption plan (B) has a 5-minute timeout. Splitting (C) loses orchestration benefits. See more: Function App
Question 24MEDIUM
You need to grant a service principal the ability to sign in to your application. Which Microsoft Entra ID configuration creates a local representation of the application in a tenant?
A service principal is the local representation (instance) of an application in a specific tenant. The app registration is the global definition, while the service principal enables the application in a particular tenant. Managed identity (B) is for Azure resources. Conditional access (D) controls access policies. See more: Azure Authentication
Question 25MEDIUM
You are using Application Insights and need to correlate telemetry from a front-end JavaScript application with backend .NET requests. Which header enables distributed tracing across these components?
Application Insights uses the W3C Trace Context standard with the traceparent header for distributed tracing. This enables correlation across languages and platforms. X-Correlation-Id (A) is custom. X-Request-Id (C) is not the standard. Request-Id (D) was the legacy AI format, now replaced by W3C. See more: Application Insights
Question 26MEDIUM
You need to implement Azure Service Bus topic subscriptions with message enrichment. You want to add a custom property to each message as it flows through a subscription. Which feature can modify messages in transit?
SqlRuleAction (SQL filter action) can modify message properties as messages pass through a topic subscription. You can set, remove, or modify application properties. Correlation filter (B) only matches messages. Dead-letter (C) handles failed messages. Auto-forwarding (D) routes messages. See more: Application Messaging
Question 27HARD
You are implementing Cosmos DB with the change feed processor library. Your processor handles events from a monitored container. Which container stores the change feed lease information?
The change feed processor requires a separate Cosmos DB lease container to track processing state (leases) across multiple instances. It stores the continuation token and partition ownership. Not in the same container (A). Not Table Storage (B) or Blob Storage (C). See more: CosmosDB
Question 28MEDIUM
You are configuring Azure Functions isolated worker model. What is the key difference from the in-process model?
The isolated worker model runs in a separate process, allowing you to use .NET versions independently of the Functions host runtime. It supports bindings (A is wrong), multiple languages (B is wrong), and both Windows and Linux (D is wrong). See more: Function App
Question 29MEDIUM
You need to store application configuration centrally and deploy feature flags for your microservices. Which Azure service is designed for this?
Azure App Configuration provides centralized configuration management and feature flag management for cloud-native applications. Key Vault (A) is for secrets, not configuration. Cosmos DB (C) and Table Storage (D) could store config but are not purpose-built for it. See more: Data Encryption
Question 30MEDIUM
You are configuring Azure Container Registry geo-replication. What benefit does it provide?
Geo-replication creates replicas of your container registry in multiple Azure regions, enabling faster image pulls from the nearest location. This reduces deployment latency and provides resilience. It does not scan images (B), provide free storage (C), or auto-deploy containers (D). See more: Containers
Question 31MEDIUM
You are implementing Cosmos DB partition key design. Your application stores e-commerce orders. Which property makes the best partition key?
customerId provides high cardinality and even data distribution. Order queries typically filter by customer. orderDate (A) creates hot partitions for recent dates. orderStatus (B) has low cardinality (only 3 values). country (D) creates uneven partitions based on geographic distribution. See more: CosmosDB
Question 32EASY
Which Azure storage redundancy option replicates data to a secondary region and provides read access to the secondary?
RA-GRS provides geo-redundancy (secondary region) WITH read access to the secondary endpoint. LRS (A) is local only. ZRS (C) is zone-redundant but single region. GRS (D) replicates to secondary but does not provide read access to it. See more: Azure Storage Accounts
Question 33MEDIUM
You are developing a web application that uses MSAL.js. After a user logs in, you need to get the user's display name from the authentication result. Which property of the AuthenticationResult contains the user information?
The AuthenticationResult in MSAL.js contains an account property with the user's name (account.name). token.displayName (B) is not a standard property. user.profile.name (C) is not MSAL structure. claims.preferred_username (D) is a token claim but not the primary way to get the display name. See more: Azure Authentication
Question 34MEDIUM
You are implementing Application Insights dependency tracking. You notice that calls to an external REST API are not being tracked. What should you do?
Application Insights auto-collects HTTP dependency calls when using standard HttpClient. If calls are not tracked, ensure the SDK is properly installed or manually use TrackDependency for custom dependencies. TrackRequest (A) is for incoming requests. Logging on the API (B) does not help the calling side. Sampling (C) may help but is not the root cause. See more: Application Insights
Question 35MEDIUM
You need to implement Azure Service Bus premium tier features. Which capability is exclusive to the Premium tier?
The Premium tier provides dedicated resources (no noisy neighbors), message sizes up to 100MB, and VNet integration. Dead-letter queues (A), topic subscriptions (B), and message sessions (D) are available in Standard tier as well. See more: Application Messaging
Question 36HARD
You are configuring Cosmos DB time-to-live (TTL). You set TTL at the container level to 60 seconds and set TTL on a specific item to -1. What happens to the item after 60 seconds?
In Cosmos DB, an item-level TTL of -1 means the item never expires, regardless of the container-level TTL. Item-level TTL overrides container TTL. Null at item level means inherit container TTL. A positive number at item level sets a custom TTL. See more: CosmosDB
Question 37MEDIUM
You need to deploy an Azure Function with a custom Docker container image. Which hosting plan option supports custom containers?
Custom Docker container images for Azure Functions are supported on the Premium plan and Dedicated (App Service) plan. The Consumption plan (B) does not support custom containers. Not all plans support it (C). Flex Consumption (D) has limited container support. See more: Function App
Question 38MEDIUM
You are implementing Azure Storage private endpoints. After configuring a private endpoint for your storage account, what DNS configuration is needed?
A private DNS zone (e.g., privatelink.blob.core.windows.net) resolves the storage account FQDN to the private endpoint IP address. Without it, the FQDN resolves to the public IP. DNS changes are required (A). You don't change the public FQDN (B). Public IP records (C) bypass the private endpoint. See more: Azure Storage Accounts
Question 39MEDIUM
You are configuring Microsoft Entra ID app roles for your application. You want to control access to specific API endpoints based on roles assigned to users. How should you validate the user's roles in your API code?
App roles assigned to users are included in the roles claim of the JWT access token. Your API validates the token and checks the roles claim for authorization. Graph API (A) adds latency. Email domain (B) is not role-based. Local database (D) bypasses the identity provider. See more: Azure Authentication
Question 40MEDIUM
You are implementing API Management with a backend that returns different response formats based on the Accept header. You need to transform all responses to JSON. Which policy should you use?
The set-body policy with a Liquid template in the outbound section provides flexible response transformation to JSON regardless of the source format. Setting the Accept header (A) only requests JSON but does not transform non-JSON responses. find-and-replace (C) is for simple text substitution. redirect-content-urls (D) modifies URLs. See more: Consuming Azure Services
Question 41MEDIUM
You need to implement Azure Event Grid system topics for monitoring Azure resource events. Which statement about system topics is correct?
System topics are created automatically when you create an event subscription against an Azure resource (e.g., Storage account, Resource Group). You do not need to create them manually (B). They differ from custom topics (C). They support all Event Grid endpoint types (D). See more: Event-Based Solutions
Question 42MEDIUM
You are implementing Application Insights for a .NET application. You want to enrich all telemetry with the current application version. How should you implement this?
An ITelemetryInitializer can set context.Component.Version on every telemetry item. This enriches all telemetry with the application version without modifying individual tracking calls. web.config (A) is not the right approach. Custom headers (B) are for HTTP. TelemetryProcessor (C) is for filtering, not enrichment. See more: Application Insights
Question 43MEDIUM
You need to use Key Vault references in Azure App Service application settings. Which syntax should you use?
The Key Vault reference syntax for App Service is @Microsoft.KeyVault(SecretUri=https://vault-name.vault.azure.net/secrets/secret-name/). You can also use @Microsoft.KeyVault(VaultName=vault-name;SecretName=secret-name). Other syntaxes (A, B, D) are not valid. See more: Data Encryption
Question 44HARD
You are implementing Azure Service Bus message deferral. A consumer receives a message but cannot process it yet because a prerequisite has not been met. After deferring the message, how do you retrieve it later?
Deferred messages can only be retrieved by their sequence number using ReceiveDeferredMessageAsync. They do not return to the queue (A, D) and are not dead-lettered (C). You must track the sequence number to retrieve them later. See more: Application Messaging
Question 45EASY
You need to list all blobs in an Azure Storage container that start with the prefix "images/2024/". Which method should you use?
GetBlobs or GetBlobsByHierarchy with a prefix parameter efficiently lists blobs matching a prefix. ListContainers (B) lists containers, not blobs. Individual GetBlobProperties (C) requires knowing blob names. Azure Search (D) is overkill for listing. See more: Azure Storage Accounts
Question 46MEDIUM
You are developing an Azure Function that uses a Cosmos DB input binding to read a document by its id and partition key. How do you specify the document to read?
The Cosmos DB input binding supports Id and PartitionKey properties. You can use binding expressions like {id} from route parameters or trigger data to dynamically specify which document to read. SQL query (A) is for multiple documents. Direct SDK (B) bypasses bindings. LINQ (D) is not in binding config. See more: Function App
Question 47MEDIUM
You are configuring Event Hub namespace authorization. You need to allow a specific application to send events but not receive them. Which access policy claim should you assign?
The Send claim allows the application to send (publish) events only, without being able to receive them. Manage (A) provides full access. Listen (C) allows receiving. Owner (D) is not a standard Event Hub claim. See more: Event-Based Solutions
Question 48MEDIUM
You are developing an application that needs to cache frequently accessed data from Cosmos DB. Which Azure service provides a fully managed in-memory cache?
Azure Cache for Redis is a fully managed in-memory data store for caching frequently accessed data. CDN (B) caches static content at edge locations. Cosmos DB integrated cache (C) is built into the gateway but is more limited. Front Door (D) is a global load balancer with CDN capabilities. See more: Consuming Azure Services
Question 49MEDIUM
You need to securely generate, manage, and control access to cryptographic keys used by your Azure services. Which service provides hardware-backed key protection?
Azure Key Vault with HSM (Hardware Security Module)-backed keys provides hardware-protected key management. Keys are generated and processed within the HSM and never leave it. Storage encryption (A) uses platform keys without direct management. AAD (B) manages identities. AIP (C) is for document protection. See more: Data Encryption
Question 50HARD
You are implementing Azure Functions extension bundles. Your function app uses .NET isolated worker model and needs to use the latest Cosmos DB trigger features. What should you configure to ensure the latest extension versions are used?
For .NET isolated worker model, you reference extension NuGet packages directly in your project file rather than using extension bundles. This gives you control over specific extension versions. Extension bundles (B, D) are used for non-.NET languages. Manual installation without the Worker.Extensions packages (A) uses the wrong package naming. See more: Function App

← Back to all AZ-204 Practice Tests


Popular Posts