Courseiva

Microsoft Azure Developer Associate AZ-204 (AZ-204) — Questions 175

881 questions total · 12pages · All types, answers revealed

Page 1 of 12

Page 2
1
MCQeasy

You are deploying an Azure Kubernetes Service (AKS) cluster. You need to ensure that pods can access Azure resources (e.g., Azure Storage) using a managed identity without storing credentials. What should you configure?

A.Use Azure AD Workload Identity for Kubernetes (or aad-pod-identity) to assign managed identities to pods.
B.Configure Azure AD integration on the AKS cluster for user authentication.
C.Create a service principal and distribute its secret to pods as a Kubernetes secret.
D.Enable managed identity on the AKS cluster and use cluster-level identity.
AnswerA

Azure AD Workload Identity for Kubernetes leverages Kubernetes service accounts and OpenID Connect (OIDC) federation. It allows pods to authenticate to Azure services using a user-assigned managed identity without embedding any secrets or connection strings directly into the pod configuration. This method significantly enhances security by eliminating the need for manual secret rotation and reducing the risk of credential exposure, aligning with the principle of least privilege.

Why this answer

Azure AD Workload Identity (or the older aad-pod-identity) allows you to assign an Azure managed identity to a pod. The pod can then authenticate to Azure resources (e.g., Azure Storage) without storing any credentials, as the identity is projected into the pod via token exchange with the Azure Instance Metadata Service (IMDS). This directly meets the requirement of using a managed identity without credential storage.

Exam trap

The trap here is that candidates confuse cluster-level managed identity (used for AKS infrastructure operations) with pod-level managed identity (used for pod-to-Azure resource access), leading them to select Option D.

How to eliminate wrong answers

Option B is wrong because Azure AD integration on the AKS cluster is used for user authentication to the cluster (e.g., kubectl access), not for pod-level identity to access Azure resources. Option C is wrong because creating a service principal and distributing its secret as a Kubernetes secret violates the requirement of 'without storing credentials' and introduces security risks of secret leakage. Option D is wrong because enabling managed identity on the AKS cluster provides a cluster-level identity for the cluster itself (e.g., for load balancer or disk operations), not for individual pods to access Azure resources like Storage.

2
MCQhard

You are developing a serverless application using Azure Functions that processes order messages from an Azure Service Bus queue. Each order message is approximately 64 KB in size. The function must process messages in order and exactly once. The current implementation uses a Service Bus trigger with batch processing enabled. You notice that occasionally duplicate messages are processed. You need to ensure exactly-once processing while maintaining message ordering. What should you do?

A.Disable batch processing in the function trigger and process messages one at a time.
B.Enable sessions on the Service Bus queue and update the function trigger to use sessions.
C.Increase the lock duration on the Service Bus queue to 5 minutes.
D.Set the maxDeliveryCount property on the queue to 1.
AnswerB

Enabling sessions on the Azure Service Bus queue and configuring the Azure Function trigger to utilize them is the most effective solution for achieving exactly-once processing. Service Bus sessions provide a mechanism for ordered handling of related messages and ensure that only one receiver processes messages for a specific session at any given time. This unique receiver lock, combined with the ability to maintain session state, effectively prevents duplicate processing and ensures messages are handled sequentially within their logical grouping.

Why this answer

Enabling sessions on the Service Bus queue and using a session-enabled trigger guarantees message ordering and exactly-once processing. Sessions group related messages into a logical sequence, and the Service Bus trigger locks the entire session, ensuring that messages within a session are processed in order and that no other consumer can process the same session concurrently. This prevents duplicate processing while maintaining the required ordering.

Exam trap

The trap here is that candidates often confuse disabling batch processing or increasing lock duration with solving duplicate processing, but these do not address the root cause of duplicate deliveries; only session-based or duplicate detection mechanisms guarantee exactly-once processing with ordering.

How to eliminate wrong answers

Option A is wrong because disabling batch processing only processes messages one at a time but does not prevent duplicates; the trigger can still receive the same message multiple times if the lock expires or if there is a transient failure. Option C is wrong because increasing the lock duration only gives more time to process a message before the lock expires, but it does not prevent duplicate deliveries caused by other factors like receiver crashes or competing consumers. Option D is wrong because setting maxDeliveryCount to 1 will cause the message to be dead-lettered after the first failed delivery attempt, but it does not prevent duplicates from being delivered in the first place; duplicate detection requires a different mechanism like sessions or duplicate detection history.

3
MCQmedium

A company stores sensitive data in Azure Blob Storage. They require that all access to the storage account be authenticated via Microsoft Entra ID and that users must have the 'Storage Blob Data Reader' role assigned. A developer reports being unable to read blobs using the Azure portal despite having the role assigned. What is the most likely cause?

A.The storage account firewall is blocking the user's IP address.
B.The user does not have the Azure RBAC Reader role on the storage account's resource group to view the storage account in the portal.
C.The storage account is using a system-assigned managed identity for authentication.
D.The role is assigned at the storage account scope but the user is trying to access a different storage account.
AnswerB

The Azure portal interacts with the Azure Resource Manager (ARM) to display and manage resources. To view any resource, including a storage account, within the portal, a user must possess at least the Azure RBAC Reader role at the resource, resource group, or subscription scope. Without this management plane permission, the storage account will not be discoverable or visible in the portal, even if the user has separate data plane permissions (e.g., Storage Blob Data Contributor) to access the actual data.

Why this answer

The Azure portal requires the 'Reader' role on the storage account's resource group (or subscription) to list and navigate to the storage account in the portal UI. Even if a user has 'Storage Blob Data Reader' at the storage account scope, without the Azure RBAC 'Reader' role on the resource group, the portal cannot enumerate the storage account resource, preventing access via the portal. The 'Storage Blob Data Reader' role only grants data-plane permissions (read blobs), not control-plane permissions needed to see the resource in the portal.

Exam trap

The trap here is that candidates often confuse data-plane roles (like 'Storage Blob Data Reader') with control-plane roles (like 'Reader'), assuming the data role alone is sufficient for portal access, but the portal requires control-plane permissions to enumerate the resource.

How to eliminate wrong answers

Option A is wrong because the storage account firewall blocking the user's IP would prevent all access (including authenticated access) to the storage account, but the user has the role assigned and the issue is specifically about portal access; firewall rules affect network-level access, not RBAC role assignment. Option C is wrong because using a system-assigned managed identity for authentication does not prevent a user with the 'Storage Blob Data Reader' role from reading blobs via the portal; managed identities are an authentication method for services, not a barrier to user access. Option D is wrong because the role being assigned at the storage account scope but the user trying to access a different storage account would result in a 'not found' or 'access denied' error, but the question states the user has the role assigned and is unable to read blobs, implying the correct storage account is targeted; the issue is about portal visibility, not cross-account access.

4
MCQmedium

You are developing an Azure Logic App that processes files from an FTP server. The workflow must run every 10 minutes and process only new files. You need to ensure that files are not processed more than once. What should you use?

A.Use the FTP trigger 'When a file is added' with a recurrence of 10 minutes.
B.Use the 'When a file is added' trigger and store processed file names in a SQL database.
C.Use the FTP trigger 'When a file is added or modified' with a recurrence of 10 minutes.
D.Use the Sliding Window trigger and set the window size to 10 minutes.
AnswerA

Correct. The 'When a file is added' trigger with a recurrence of 10 minutes uses built-in state management to process only new files, preventing reprocessing.

Why this answer

The 'When a file is added' FTP trigger in Azure Logic Apps automatically tracks processed files using a built-in 'trigger state' mechanism. When combined with a recurrence schedule (e.g., every 10 minutes), it ensures that only new files since the last run are processed, preventing duplicate processing without external state management.

Exam trap

The trap here is that candidates often incorrectly assume that the 'When a file is added or modified' trigger is required for deduplication, but the plain 'When a file is added' trigger already has built-in state tracking. Using 'or modified' would also process modified files, which is not desired.

How to eliminate wrong answers

Option A is wrong because the 'When a file is added' trigger does not inherently track which files have already been processed; it can reprocess files if the trigger runs again without state persistence. Option B is wrong because storing processed file names in a SQL database introduces unnecessary complexity and external dependencies; the built-in trigger state already handles deduplication. Option D is wrong because the Sliding Window trigger is designed for event-based triggers (e.g., Azure Service Bus, Event Hubs) and is not applicable to FTP triggers; it does not provide file-level deduplication.

5
MCQhard

A company uses Azure API Management to expose APIs. They need to enforce rate limiting per subscription key and also allow a burst of requests for a short period. Which policy should they apply?

A.limit-concurrency
B.rate-limit (per product)
C.rate-limit-by-key
D.rate-limit-by-ip
AnswerC

The `rate-limit-by-key` policy is the correct choice as it specifically enforces request limits on a per-subscription-key basis, ensuring each individual API consumer is independently governed. This policy allows precise control over the number of API calls permitted within a defined time window for a unique subscriber, identified by their distinct subscription key. Its support for burst limits further enhances flexibility by allowing temporary spikes in traffic while maintaining overall rate adherence.

Why this answer

The `rate-limit-by-key` policy is correct because it allows rate limiting based on a specified key, such as a subscription key, and supports a burst configuration via the `renewal-period` and `retry-after` attributes. This policy enforces a per-key counter that resets after a defined period, enabling a burst of requests (e.g., 10 requests in 60 seconds) while still enforcing an overall limit.

Exam trap

The trap here is that candidates confuse `rate-limit-by-key` with `rate-limit (per product)`, assuming product-level limits automatically apply per subscription, but product limits aggregate all subscriptions under that product, not per individual key.

How to eliminate wrong answers

Option A is wrong because `limit-concurrency` throttles the number of simultaneous requests, not the rate over time, and does not support burst behavior or key-based scoping. Option B is wrong because `rate-limit (per product)` applies limits at the product level, not per individual subscription key, and cannot enforce per-key bursts. Option D is wrong because `rate-limit-by-ip` limits based on the caller's IP address, not the subscription key, and cannot differentiate between different subscribers behind the same IP.

6
MCQhard

You deploy a containerized application on Azure Container Instances (ACI). The application writes data that must persist across container restarts and be accessible from multiple instances. Which volume mount should you configure?

A.Azure Files share
B.emptyDir volume
C.Azure Disk
D.ConfigMap
AnswerA

Azure Files offers SMB shares that can be mounted as volumes in ACI, persisting data independent of the container lifecycle.

Why this answer

Azure Files shares provide a fully managed SMB file share in the cloud that can be mounted as a volume in Azure Container Instances. This allows data written by the container to persist across restarts and be accessed concurrently by multiple container instances, meeting the requirements for durability and shared access.

Exam trap

The trap here is confusing Azure Disk (which is block storage with ReadWriteOnce semantics) with Azure Files (which is file storage with ReadWriteMany semantics), leading candidates to choose Azure Disk for persistence without considering multi-instance access requirements.

How to eliminate wrong answers

Option B is wrong because an emptyDir volume is ephemeral and tied to the lifecycle of a pod; data is lost when the container restarts and cannot be shared across multiple instances. Option C is wrong because Azure Disk supports ReadWriteOnce access mode, meaning it can only be mounted by a single container instance at a time, not multiple instances concurrently. Option D is wrong because a ConfigMap is designed for injecting configuration data (e.g., environment variables, files) into containers, not for persistent storage of application data.

7
Multi-Selecteasy

You are developing an Azure App Service web app that must authenticate users via Microsoft Entra ID. Which TWO components are required to set up authentication?

Select 2 answers
A.A managed identity
B.Client ID and Client Secret
C.An App Registration in Microsoft Entra ID
D.An Azure AD B2C tenant
E.Azure Front Door
AnswersB, C

A Client ID, also known as the Application ID, uniquely identifies the application within Microsoft Entra ID, while a Client Secret is a confidential credential (like a password or certificate) used by confidential client applications, such as web apps, to prove their identity. These two components are fundamental in OAuth 2.0 flows, enabling the application to securely acquire access tokens and ID tokens from Microsoft Entra ID for user authentication and authorization.

Why this answer

To authenticate users via Microsoft Entra ID in an Azure App Service web app, you must register the app in Entra ID (Option C) to establish an identity and configure authentication. The Client ID and Client Secret (Option B) are then used as credentials in the OAuth 2.0 authorization code flow to verify the app's identity and obtain tokens. These two components are mandatory for the standard OpenID Connect authentication flow.

Exam trap

The trap here is that candidates often confuse managed identities (used for Azure resource-to-resource authentication) with the credentials needed for user authentication, leading them to select Option A instead of the correct Client ID and Secret.

8
MCQhard

A Kubernetes-based image resize worker on AKS must pull images from Azure Container Registry without storing registry passwords in Kubernetes secrets. What should be used?

A.Store the ACR admin password in every deployment manifest
B.Attach the ACR to AKS or grant the kubelet managed identity AcrPull
C.Make the container registry public
D.Use an App Service deployment slot
AnswerB

AKS can authenticate to ACR through managed identity permissions such as AcrPull.

Why this answer

Attaching an ACR to an AKS cluster or granting the kubelet managed identity the AcrPull role eliminates the need to store registry passwords in Kubernetes secrets. This leverages Azure AD managed identities for secure, password-less authentication, where the AKS cluster's kubelet uses its managed identity to authenticate with ACR via Azure Resource Manager tokens. The AcrPull role assignment authorizes the identity to pull images, ensuring credentials are never exposed in manifests or secrets.

Exam trap

The trap here is that candidates may think storing credentials in Kubernetes secrets (option A) is acceptable, but the question explicitly forbids that, and they might overlook the managed identity integration as the secure, password-less alternative.

How to eliminate wrong answers

Option A is wrong because storing the ACR admin password in every deployment manifest violates security best practices by exposing static credentials in plaintext, and it requires manual rotation of passwords across all manifests. Option C is wrong because making the container registry public exposes all images to the internet without authentication, creating a severe security vulnerability and violating least-privilege principles. Option D is wrong because App Service deployment slots are a feature for staging and swapping deployments in Azure App Service, not for authenticating to ACR from AKS; they have no relevance to Kubernetes image pull authentication.

9
MCQhard

Your Azure App Service app uses SignalR Service to push real-time updates to clients. You notice that some clients are disconnected after 30 minutes of inactivity. What is the most likely cause and solution?

A.The app service plan is scaled down, causing idle connections to drop
B.The app service plan has an idle timeout of 30 minutes
C.The SignalR service is in serverless mode, which disconnects idle clients
D.The Azure SignalR Service has a default client timeout of 30 minutes; configure the ClientTimeout setting in the SignalR service
AnswerD

The Azure SignalR Service includes a configurable ClientTimeoutInterval property, which defaults to 30 minutes. This setting dictates the maximum period of inactivity allowed on a client connection before the service proactively terminates it. To prevent unexpected disconnections for idle clients, administrators should increase this ClientTimeoutInterval value within the SignalR Service configuration to a duration appropriate for their application's requirements.

Why this answer

The Azure SignalR Service has a default idle client timeout of 30 minutes. When a client connection remains idle (no data frames sent or received) for this duration, the service proactively closes the connection to conserve resources. To prevent this, you must configure the `ClientTimeout` setting in the SignalR service to a higher value or implement keep-alive mechanisms such as ping frames from the client.

Exam trap

The trap here is that candidates confuse the App Service plan's idle timeout (which affects the web app process) with the SignalR Service's client timeout, leading them to incorrectly select Option B, whereas the real culprit is the SignalR Service's default 30-minute idle disconnect.

How to eliminate wrong answers

Option A is wrong because scaling down the App Service plan reduces compute capacity but does not impose a 30-minute idle timeout on SignalR connections; idle connection drops due to scaling are not time-bound to exactly 30 minutes. Option B is wrong because the App Service plan's idle timeout (default 20 minutes for Always On disabled) applies to the web app process, not to SignalR Service connections, and the default is 20 minutes, not 30. Option C is wrong because SignalR Service in serverless mode does not have a built-in 30-minute idle disconnect; serverless mode uses Azure Functions and still respects the same `ClientTimeout` setting, but the default timeout is not exclusive to serverless mode.

10
Drag & Dropmedium

Arrange the steps to implement Azure Functions with a Cosmos DB trigger in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

First create Cosmos DB, then Function App, add trigger binding, write code, test.

11
MCQhard

You are building a compliance solution that stores terabytes of data in Azure Blob Storage. Data is appended frequently and never modified. Regulatory requirements mandate that no data can be overwritten or deleted for 7 years. Which storage configuration should you enable?

A.Enable immutability policy (time-based retention)
B.Enable blob soft delete
C.Enable blob versioning
D.Enable change feed
AnswerA

Enabling an immutability policy with time-based retention places blobs into a Write Once, Read Many (WORM) state for a specified duration. This prevents any modification or deletion of the blob data, including metadata and properties, until the retention period expires. This feature is specifically designed to meet stringent regulatory compliance requirements by ensuring data integrity and non-repudiation over long periods.

Why this answer

A is correct because a time-based retention policy under Azure Blob Storage immutability policy ensures that blobs cannot be overwritten or deleted for a specified duration (here, 7 years). This meets the regulatory requirement of write-once-read-many (WORM) compliance, and the policy is enforced at the storage container level, preventing any modifications or deletions even by the storage account owner.

Exam trap

The trap here is that candidates often confuse immutability policies with soft delete or versioning, thinking that preserving previous versions or recovering deleted blobs satisfies the 'no overwrite or delete' requirement, but only immutability policies provide a hard enforcement that prevents the operation from succeeding in the first place.

How to eliminate wrong answers

Option B is wrong because blob soft delete only protects against accidental deletion by retaining deleted blobs for a configurable retention period, but it does not prevent overwrites or provide a hard guarantee against deletion—data can still be permanently deleted before the soft-delete retention expires if the policy is changed. Option C is wrong because blob versioning preserves previous versions of a blob when it is overwritten or deleted, but it does not prevent overwrites or deletions from occurring; a user can still overwrite the current version, and the regulatory requirement mandates that no data can be overwritten or deleted at all. Option D is wrong because the change feed provides a transaction log of all changes to blobs in a container, but it does not enforce any retention or immutability—it only records events and does not prevent modifications or deletions.

12
MCQeasy

A company uses Azure Logic Apps to integrate with a third-party REST API. The API has a rate limit of 100 requests per minute. You need to ensure that the Logic App respects this limit. Which connector feature should you configure?

A.Retry policy.
B.Concurrency control.
C.Swagger connector.
D.API Management.
AnswerB

Concurrency control in Azure Logic Apps allows developers to limit the number of workflow instances or loop iterations that can run simultaneously for a specific trigger or action. By setting a maximum concurrent run limit, the Logic App proactively throttles its own outbound requests, preventing it from overwhelming a downstream API. This mechanism directly helps in adhering to external service rate limits by controlling the rate of outgoing calls.

Why this answer

Concurrency control in Azure Logic Apps allows you to limit the number of concurrent workflow instances (when applied to the trigger) or parallel iterations (when applied to a 'For each' loop). By configuring this setting, you can proactively manage the rate at which requests are sent to an external API, helping to prevent exceeding rate limits. For example, if each Logic App run makes one API call, setting the concurrency limit on the trigger to a value that aligns with the rate limit (e.g., 100, if runs are short and the trigger fires frequently) can help throttle the overall request volume by queuing additional runs.

This proactively manages the request volume, unlike a retry policy which reacts to failures.

Exam trap

The trap here is that candidates often confuse Retry policy (which handles failures after they occur) with concurrency control (which prevents the failures by limiting parallelism), leading them to select Retry policy as a proactive solution when it is actually reactive.

How to eliminate wrong answers

Option A is wrong because Retry policy handles transient failures (e.g., HTTP 429 or 5xx) by retrying failed requests, but it does not prevent the Logic App from sending too many requests in the first place; it only reacts after a limit is exceeded. Option C is wrong because a Swagger connector is used to import an OpenAPI definition for custom API integration, not to control request rate or concurrency. Option D is wrong because API Management is an external service that can enforce rate limits via policies, but it is not a feature of the Logic App connector itself; the question asks for a connector feature to configure within the Logic App.

13
MCQmedium

You are using Azure Event Grid to respond to blob storage events (blob created). You need to ensure that only JPEG image files trigger a function for processing, while other files are ignored. The number of files is high, and you want to minimize cost and latency. How should you filter events?

A.Create the function to check the blob extension at the start of the function code and return early if it's not a JPEG.
B.Configure Advanced Filters on the Event Grid subscription with a 'subjectEndsWith' condition set to '.jpg' or '.jpeg'.
C.Create separate event subscriptions for each file extension and point them to different functions.
D.Use Event Hubs capture to filter files before sending events.
AnswerB

Configuring Advanced Filters on the Event Grid subscription is the most efficient and cost-effective solution. By setting a 'subjectEndsWith' condition to '.jpg' or '.jpeg', Event Grid will inspect the event's subject property, which typically contains the blob's full path and name, and only deliver events for matching file extensions. This pre-filters events at the platform level, preventing unnecessary function invocations and significantly reducing compute costs and latency.

Why this answer

Azure Event Grid supports advanced filtering on event properties, including 'subjectEndsWith', which allows you to filter events at the service level before they are delivered to the endpoint. This ensures that only blob creation events for files ending with '.jpg' or '.jpeg' trigger the function, reducing unnecessary invocations, cost, and latency. By filtering at the Event Grid level, you avoid processing unwanted events entirely, which is more efficient than filtering within the function code.

Exam trap

The trap here is that candidates often default to filtering inside the function code (Option A) because it seems simpler, but they overlook that Event Grid's advanced filtering can prevent the function from being triggered at all, which is the key to minimizing cost and latency in high-volume scenarios.

How to eliminate wrong answers

Option A is wrong because it requires the function to be invoked for every blob creation event, including non-JPEG files, which increases cost and latency due to unnecessary function executions; this approach does not minimize cost or latency as required. Option C is wrong because creating separate event subscriptions for each file extension increases management complexity and does not provide a cost or latency benefit over a single subscription with advanced filters; it also requires multiple functions or routing logic. Option D is wrong because Event Hubs capture is designed for data ingestion and storage, not for real-time event filtering; it adds unnecessary complexity and latency compared to Event Grid's built-in filtering capabilities.

14
MCQhard

You need to store a large (terabytes) append-only dataset for compliance purposes. The data must be immutable to prevent tampering after writes. You also want to minimize storage cost and achieve high write throughput. Which Azure Storage solution should you use?

A.Azure Blob Storage with Append Blobs and an immutable blob policy
B.Azure Data Lake Storage Gen2 with Append Blobs and immutability
C.Azure Files with immutable shares
D.Azure NetApp Files with immutability
AnswerA

Azure Blob Storage with Append Blobs is specifically designed for efficient, cost-effective ingestion of log data and other append-only workloads, making it ideal for terabyte-scale datasets. An immutable blob policy, configured as a time-based retention or legal hold, ensures Write Once, Read Many (WORM) compliance by preventing any modification or deletion of data for a specified period, meeting stringent regulatory requirements.

Why this answer

Azure Blob Storage with Append Blobs and an immutable blob policy is correct because Append Blobs are optimized for append-only operations (e.g., logging, audit trails) and support high write throughput. Immutable blob policies (WORM – Write Once, Read Many) enforce data immutability at the blob level, preventing modification or deletion during the retention period, which meets compliance requirements. This combination minimizes storage cost by using the cool or archive tier for Append Blobs, while still achieving the required write performance.

Exam trap

The trap here is that candidates often confuse Azure Data Lake Storage Gen2 (which is just Blob Storage with a hierarchical namespace) as having separate immutability features, but immutability is a Blob Storage capability that works identically on Data Lake Storage Gen2; however, the question's append-only requirement is best met by Append Blobs in standard Blob Storage, not by adding the hierarchical namespace overhead of Data Lake Storage Gen2.

How to eliminate wrong answers

Option B is wrong because Azure Data Lake Storage Gen2 is built on Blob Storage and supports Append Blobs, but it does not natively offer immutable blob policies; immutability is a Blob Storage feature, not a Data Lake Storage Gen2 feature, and using Data Lake Storage Gen2 would add unnecessary complexity and cost for a simple append-only compliance scenario. Option C is wrong because Azure Files with immutable shares is designed for SMB file shares and does not support append-only operations or high write throughput at the terabyte scale; it is optimized for shared file access, not streaming append workloads. Option D is wrong because Azure NetApp Files is a high-performance file service for NFS/SMB workloads, not designed for append-only blob storage; it lacks native append-blob semantics and immutable blob policies, and its cost is significantly higher for large-scale compliance data.

15
MCQhard

Trey Research uses Azure Service Bus for messaging between microservices. One microservice written in Node.js needs to send messages to a queue. The team wants to use managed identity to authenticate to Service Bus. The microservice runs in an Azure Container Instance (ACI) with a user-assigned managed identity. The identity has been granted 'Sender' role on the Service Bus namespace. The team uses the @azure/service-bus SDK. Which code snippet should the developer use to create a ServiceBusClient?

A.const { ServiceBusClient } = require('@azure/service-bus'); const { InteractiveBrowserCredential } = require('@azure/identity'); const credential = new InteractiveBrowserCredential(); const sbClient = new ServiceBusClient('<namespace>.servicebus.windows.net', credential);
B.const { ServiceBusClient } = require('@azure/service-bus'); const { DefaultAzureCredential } = require('@azure/identity'); const credential = new DefaultAzureCredential(); const sbClient = new ServiceBusClient('<namespace>.servicebus.windows.net', credential);
C.const { ServiceBusClient } = require('@azure/service-bus'); const { ManagedIdentityCredential } = require('@azure/identity'); const credential = new ManagedIdentityCredential('<client-id>'); const sbClient = new ServiceBusClient('<namespace>.servicebus.windows.net', credential);
D.const { ServiceBusClient } = require('@azure/service-bus'); const sbClient = new ServiceBusClient('<connection-string>');
AnswerB

Correct: DefaultAzureCredential works with user-assigned MI if environment variable set.

Why this answer

DefaultAzureCredential (option B) is the correct choice because it automatically uses the managed identity of the Azure resource (ACI) when the environment variable AZURE_CLIENT_ID is set to the user-assigned identity's client ID. This approach works without hardcoding credentials. Option A (InteractiveBrowserCredential) is for interactive user scenarios and is inappropriate for a server-side application.

Option C (ManagedIdentityCredential) would also work but requires explicitly passing the client ID, which is less flexible and not the recommended pattern. Option D uses a connection string, bypassing managed identity entirely.

16
MCQeasy

Your Azure App Service app must access Azure Key Vault secrets without storing credentials in code. Which service should you use to manage identities?

A.Service principal with client secret
B.Managed identity
C.Storage account access key
D.Client certificate
AnswerB

Managed identities provide an identity for Azure services in Azure Active Directory, eliminating the need for developers to manage credentials. When an App Service uses a managed identity, Azure automatically handles the authentication to Azure AD and acquires access tokens to interact with other Azure resources like Key Vault. This approach significantly enhances security and simplifies operations by removing the burden of credential storage, rotation, and protection from the application.

Why this answer

Managed identity (B) is correct because it provides an automatically managed Azure AD identity for your App Service app, allowing it to authenticate to Azure Key Vault without storing any credentials in code or configuration. The identity is tied to the app's lifecycle and can be used with Azure RBAC to grant access to secrets, eliminating the need for manual credential management.

Exam trap

The trap here is that candidates often confuse service principals (which require credential storage) with managed identities (which are credential-free), leading them to pick option A because they think any Azure AD identity is equivalent.

How to eliminate wrong answers

Option A is wrong because a service principal with client secret requires storing the secret in code or configuration, which violates the requirement of not storing credentials. Option C is wrong because a storage account access key is used for accessing Azure Storage, not for managing identities or accessing Key Vault secrets. Option D is wrong because a client certificate, while more secure than a secret, still requires the certificate to be stored and managed in the app's code or configuration, failing the 'without storing credentials' requirement.

17
MCQmedium

You develop an Azure Function app that processes orders. The function must write order status updates to a database. You need to ensure that if the function fails after writing to the database, the order is not lost and can be retried. Which pattern should you implement?

A.Use a Durable Functions orchestration
B.Use a retry policy in the function code
C.Enable function-level exception handling
D.Use an Azure Storage Queue for the function input
AnswerA

Durable Functions orchestrations are specifically designed for stateful workflows, allowing you to define a reliable sequence of operations that can span multiple function invocations and external system interactions. The orchestrator function maintains its state, automatically retries failed activity functions, and can implement complex compensation logic to ensure the entire order processing workflow completes atomically or achieves eventual consistency, even across failures and reboots. This provides robust error handling and guarantees the overall process state.

Why this answer

Durable Functions orchestrations provide built-in support for reliable execution and automatic retry on failure. By using an orchestration, you can write the order status to the database as an activity function, and if the function fails after the write, the orchestration can replay from the last checkpoint, ensuring the order is not lost and can be retried without duplicating the write.

Exam trap

The trap here is that candidates often confuse a simple retry policy (Option B) with the durable checkpointing and replay mechanism, not realizing that a retry policy alone cannot prevent duplicate writes or recover from failures that occur after a side effect has been committed.

How to eliminate wrong answers

Option B is wrong because a retry policy in the function code only retries the current invocation; if the failure occurs after the database write, the retry would re-execute the entire function, potentially causing duplicate writes or inconsistent state. Option C is wrong because enabling function-level exception handling merely catches errors but does not provide a mechanism to replay or retry the operation from a known safe point, so the order could be lost if the function fails after the database write. Option D is wrong because using an Azure Storage Queue for input only decouples the trigger but does not inherently provide checkpointing or replay capabilities; the function would still need to manage its own retry and idempotency logic to avoid losing the order.

18
Multi-Selecthard

Your application uses Azure App Service and needs to authenticate users via Microsoft Entra ID. Which THREE components must be configured in the App Service authentication settings?

Select 3 answers
A.Client ID
B.Allowed token audiences
C.Issuer URL
D.Client secret
E.Tenant ID
AnswersA, B, C

Required to identify the application.

Why this answer

The Client ID uniquely identifies your application registration in Microsoft Entra ID. App Service uses this ID to initiate the OAuth 2.0 authorization code flow, ensuring that tokens are issued specifically to your app. Without it, the authentication middleware cannot associate incoming tokens with your registered application.

Exam trap

The trap here is that candidates often confuse the required fields for App Service authentication with those needed for a manual OAuth 2.0 implementation, mistakenly adding the Client secret or Tenant ID as separate required fields when they are either optional or derived from the Issuer URL.

19
Multi-Selecthard

You are designing a serverless application using Azure Functions that needs to read from an Azure Storage Blob, process the data, and write to Azure Cosmos DB. Which THREE bindings are required?

Select 3 answers
A.HTTP trigger
B.Cosmos DB input binding
C.Blob input binding
D.Cosmos DB output binding
E.Timer trigger
AnswersA, C, D

An HTTP trigger allows an Azure Function to be invoked directly by an HTTP request, making it ideal for creating API endpoints, webhooks, or responding to direct user interactions. It provides a unique URL that external clients can call, passing data in the request body or query parameters to initiate the function's execution. This mechanism is fundamental for building responsive, on-demand serverless applications that react to external events.

Why this answer

The HTTP trigger is correct because the question describes a serverless application that needs to be invoked to read from Blob Storage, process data, and write to Cosmos DB. An HTTP trigger allows the function to be started via an HTTP request, which is the typical entry point for such event-driven processing. Without a trigger, the function cannot execute; the HTTP trigger provides the necessary invocation mechanism.

Exam trap

The trap here is that candidates often confuse input bindings with output bindings, mistakenly thinking a Cosmos DB input binding is needed to read data, when in fact the data source is Blob Storage and only an output binding to Cosmos DB is required.

20
MCQeasy

You have an Azure App Service web app with a system-assigned managed identity. You need to grant it permission to read secrets from an Azure Key Vault. Which RBAC role should you assign to the managed identity at the Key Vault scope?

A.Key Vault Secrets User
B.Key Vault Reader
C.Key Vault Crypto User
D.Contributor
AnswerA

The Key Vault Secrets User role grants the necessary data plane permissions to retrieve the actual secret values stored within Azure Key Vault. Specifically, this role includes the `Microsoft.KeyVault/vaults/secrets/getSecret` data action, which is essential for an application's managed identity to programmatically access and use sensitive configuration data like database connection strings or API keys. Without this specific role, the App Service would be unable to decrypt and fetch the secret's content for operational use.

Why this answer

The system-assigned managed identity needs to read secrets from Key Vault. The 'Key Vault Secrets User' role grants exactly that permission — it allows the identity to perform secret read operations (Get, List) on the secrets in the vault. This is the correct RBAC role for read-only access to secrets, as opposed to keys or certificates.

Exam trap

The trap here is that candidates often confuse 'Key Vault Reader' (which only reads vault metadata, not secrets) with the actual data-plane role needed for secret access, or they mistakenly choose a broad role like 'Contributor' thinking it includes secret read permissions.

How to eliminate wrong answers

Option B is wrong because 'Key Vault Reader' only allows listing and reading the metadata of the vault itself (e.g., vault properties, tags), not the actual secret values. Option C is wrong because 'Key Vault Crypto User' grants permissions for cryptographic operations on keys (e.g., encrypt, decrypt, sign, verify), not for reading secrets. Option D is wrong because 'Contributor' is a general Azure RBAC role that grants full management access to the Key Vault resource (including creating/deleting vaults and changing access policies), which is far more permissive than needed and violates the principle of least privilege.

21
MCQeasy

You manage a web application on Azure App Service. You need to monitor its availability from multiple geographic locations, checking that the homepage loads and returns HTTP 200 within 5 seconds. You want an alert if any location fails. Which type of Application Insights test should you create?

A.Availability test (URL ping test)
B.Multi-step web test
C.Standard test
D.Custom metric test
AnswerC

The Standard test is a newer availability test type that supports SSL validation, request headers, and other advanced features. While it can also check HTTP 200 and timeout, the question asks for the 'simplest' test that meets the requirements, and the URL ping test is simpler and directly designed for basic availability checks.

Why this answer

A Standard test (also known as a URL ping test) is the correct choice because it is the simplest availability test in Application Insights, designed to check that a single URL returns an HTTP 200 response within a specified timeout (here, 5 seconds). It can be configured to run from multiple geographic locations, and you can set an alert to fire if any location reports a failure, meeting the requirement exactly. In the Azure portal, this test type is explicitly named 'Standard test'.

Exam trap

Candidates may be confused by the terminology. While 'URL ping test' is a common descriptive term for this functionality, the specific name used in the Azure portal when creating this type of availability test is 'Standard test'.

How to eliminate wrong answers

Option B is wrong because a multi-step web test is used for validating a sequence of user actions (e.g., login, navigate, submit) across multiple URLs, not for a single homepage check. Option C is wrong because a standard test is a newer, more advanced availability test that supports SSL certificate validation and request headers, but it is not the simplest option for a basic HTTP 200 check and is not required here. Option D is wrong because a custom metric test is not a type of availability test; it is used to send custom metrics to Application Insights via the TrackMetric API, not for monitoring URL availability from multiple locations.

22
MCQeasy

A developer needs to store a large number of binary files (images) that are accessed frequently from a web app. Which Azure storage solution is most cost-effective?

A.Azure Queue Storage
B.Azure Files
C.Azure Blob Storage
D.Azure Cosmos DB
AnswerC

Azure Blob Storage is purpose-built for storing massive amounts of unstructured object data, such as binary files, images, videos, and documents, at a highly scalable and cost-effective rate. It offers various access tiers (Hot, Cool, Archive) to optimize costs based on access frequency and provides direct HTTP/S access to individual blobs. Its design makes it ideal for cloud-native applications requiring global accessibility, high availability, and efficient storage for large volumes of binary content.

Why this answer

Azure Blob Storage is the most cost-effective solution for storing large numbers of binary files like images because it is optimized for massive scale, high-throughput, and low-cost object storage. It supports hot, cool, and archive access tiers to balance cost and access frequency, and it integrates directly with web apps via HTTP/HTTPS REST APIs or SDKs, making it ideal for frequently accessed static content.

Exam trap

The trap here is that candidates often confuse Azure Files with Blob Storage because both store files, but Azure Files is designed for SMB-based file shares (e.g., for legacy apps or shared drives) and is more expensive per GB than Blob Storage, making it the wrong choice for cost-effective, high-frequency binary file serving.

How to eliminate wrong answers

Option A is wrong because Azure Queue Storage is a messaging service for asynchronous communication between application components, not designed for storing or serving binary files like images. Option B is wrong because Azure Files provides fully managed SMB file shares for legacy or lift-and-shift scenarios, but it is more expensive per GB than Blob Storage and incurs additional costs for transactions and data access, making it less cost-effective for high-frequency image serving. Option D is wrong because Azure Cosmos DB is a NoSQL database optimized for low-latency, globally distributed transactional data with high throughput and indexing costs, which is overkill and significantly more expensive than Blob Storage for storing and serving static binary files.

23
MCQeasy

You are building a serverless API using Azure Functions. The API must authenticate requests using Microsoft Entra ID. You need to restrict access to users from a specific Microsoft Entra tenant only. What should you configure in the function app?

A.Set the 'Allowed Token Audiences' to the application ID.
B.Enable 'Require Authentication' and set the action to 'Login with Microsoft Entra ID'.
C.Set the 'Client ID' to the application ID.
D.Set the 'Issuer URL' to the specific tenant's endpoint.
AnswerD

Setting the 'Issuer URL' to the specific tenant's endpoint is the correct method for restricting access to a single Microsoft Entra ID tenant. The 'iss' (issuer) claim in a JWT identifies the security token service (STS) that issued the token. By configuring the Azure Function's authentication settings to validate against a specific tenant's issuer URL (e.g., `https://login.microsoftonline.com/<tenant-id>/v2.0`), the function will only accept tokens originating from that precise tenant, effectively enforcing tenant-specific access control.

Why this answer

Setting the 'Issuer URL' to the specific tenant's endpoint (e.g., https://login.microsoftonline.com/{tenant-id}/v2.0) tells Azure Functions to validate that the token was issued by that exact tenant. This restricts access to users from that tenant only, as tokens from other tenants will fail issuer validation.

Exam trap

The trap here is that candidates confuse 'Client ID' (which identifies the app) or 'Allowed Token Audiences' (which validates the audience) with tenant restriction, but only the Issuer URL enforces which tenant's tokens are accepted.

How to eliminate wrong answers

Option A is wrong because 'Allowed Token Audiences' validates that the token is intended for your application (audience claim), not the tenant; it does not restrict which tenant issued the token. Option B is wrong because enabling 'Require Authentication' with 'Login with Microsoft Entra ID' simply enforces authentication but does not restrict to a specific tenant; it allows any Microsoft Entra ID tenant by default. Option C is wrong because setting the 'Client ID' identifies your application to the identity provider, but does not enforce tenant restriction; it is used for audience validation, not issuer validation.

24
MCQmedium

Your Azure web app is running in a production environment. Users report that the app is slow. You need to identify the root cause without impacting production traffic. Which approach should you use?

A.Enable Application Insights Profiler
B.Enable Application Insights sampling at 100%
C.Run a load test in a staging slot
D.Review server logs in the web app
AnswerA

Application Insights Profiler is specifically designed for diagnosing performance issues in production environments with minimal impact. It continuously collects detailed execution traces, including CPU usage, garbage collection events, and call stacks, allowing developers to pinpoint exact code paths, database queries, or external service calls that are contributing to slowness. This granular visibility into application behavior is crucial for identifying root causes of performance bottlenecks without requiring code changes or redeployments.

Why this answer

Application Insights Profiler provides detailed, per-request performance traces that pinpoint which code paths are consuming the most time, enabling root cause analysis of slow responses without altering production traffic. Unlike sampling or logs, Profiler captures execution data on-demand or automatically with minimal overhead, making it ideal for diagnosing latency issues in a live environment.

Exam trap

The trap here is that candidates often confuse high-level monitoring (logs, metrics) with diagnostic profiling, assuming that more data (100% sampling) or separate testing (staging slot) will solve the problem, when in fact Profiler is the only tool designed for low-overhead, code-level latency analysis in production.

How to eliminate wrong answers

Option B is wrong because enabling sampling at 100% would capture every telemetry event, significantly increasing data volume and cost, and could impact app performance due to the overhead of transmitting all telemetry, which defeats the goal of not affecting production traffic. Option C is wrong because running a load test in a staging slot tests synthetic traffic, not the actual production workload causing user-reported slowness, so it cannot identify the real root cause. Option D is wrong because reviewing server logs provides high-level error and request counts but lacks the granular, code-level timing details needed to pinpoint specific slow code paths, making it insufficient for root cause analysis of performance issues.

25
MCQmedium

You manage a set of APIs using Azure API Management (APIM). One backend API requires an API key passed in the 'X-API-Key' header. The API key is stored securely in a named value in APIM. You need to configure APIM to add this header to all requests to that backend without exposing the key to API consumers. Which policy should you add to the inbound processing for that API?

A.set-backend-service
B.set-header
C.authentication-basic
D.validate-jwt
AnswerB

The set-header policy is the precise solution for this requirement, as it explicitly allows for the addition, modification, or deletion of HTTP headers in either the request or response. It can be configured to add a custom header, such as X-API-Key, with its value securely retrieved from a Named Value within APIM. This approach ensures the API key remains confidential, preventing its exposure in policy definitions or to API consumers, while successfully passing it to the backend.

Why this answer

The 'set-header' policy in Azure API Management allows you to add, modify, or remove HTTP headers on requests or responses. By placing this policy in the inbound processing section, you can inject the 'X-API-Key' header with the value retrieved from a named value (using the '{{NamedValue}}' syntax) without exposing the key to API consumers, as the policy executes on the gateway side.

Exam trap

The trap here is that candidates often confuse 'set-header' with 'authentication-basic' because both deal with adding authentication-related headers, but 'authentication-basic' specifically encodes credentials in Base64 and is intended for HTTP Basic Auth, not for arbitrary API key headers.

How to eliminate wrong answers

Option A is wrong because 'set-backend-service' is used to change the backend service URL for the request, not to manipulate headers. Option C is wrong because 'authentication-basic' is used to add a Basic Authentication header (username:password encoded in Base64) to the backend request, which is not the same as adding a custom API key header. Option D is wrong because 'validate-jwt' is used to enforce the existence and validity of a JSON Web Token (JWT) in the request, not to add a header.

26
MCQmedium

You are building a mobile app backend using Azure Functions. The function must send push notifications to devices using the Notification Hubs service. You need to authenticate the function to Notification Hubs using the principle of least privilege. What should you use?

A.Store the Notification Hubs connection string in Application Settings.
B.Use a managed identity assigned to the Function App to access Notification Hubs.
C.Create a shared access signature (SAS) token for the Notification Hub.
D.Use Microsoft Entra ID OAuth 2.0 client credentials flow.
AnswerB

Managed identities provide an automatically managed identity in Microsoft Entra ID for Azure services, eliminating the need for developers to manage credentials. Assigning a system-assigned or user-assigned managed identity to the Function App allows it to authenticate to Azure Notification Hubs without storing any secrets. This approach enables fine-grained access control through Azure RBAC, where specific roles, such as 'Azure Notification Hubs Data Sender' or 'Contributor', can be assigned to the managed identity, ensuring the function operates with the principle of least privilege for its required operations.

Why this answer

Using a managed identity assigned to the Function App allows it to authenticate to Azure Notification Hubs without storing any credentials in code or configuration. This follows the principle of least privilege by granting only the necessary permissions (e.g., via Azure RBAC role assignments like 'Notification Hubs Data Sender') and eliminates the risk of connection string leakage. Managed identities are the recommended approach for Azure services to securely access other Azure resources.

Exam trap

The trap here is that candidates often confuse managed identities with SAS tokens or connection strings, thinking any form of shared secret is acceptable, but the principle of least privilege demands a secretless, identity-based approach that only managed identities provide.

How to eliminate wrong answers

Option A is wrong because storing the Notification Hubs connection string in Application Settings still exposes a shared secret that grants broad permissions (e.g., manage, send, listen) and violates the principle of least privilege; it also requires manual rotation and management. Option C is wrong because creating a SAS token for the Notification Hub still relies on a shared key and does not leverage Azure RBAC; SAS tokens are typically used for fine-grained access but still embed a secret and require secure distribution. Option D is wrong because Microsoft Entra ID OAuth 2.0 client credentials flow is used for service-to-service authentication with an app registration and client secret, which still requires managing a secret and does not provide the zero-secret, identity-based access that managed identities offer.

27
MCQmedium

You have an Azure Function app that uses a Service Bus queue trigger. The function processes messages, but sometimes it takes longer than 5 minutes to process a single message. You notice that the message is processed multiple times. What is the most likely cause?

A.The function's timeout is set to 5 minutes
B.The lock duration on the queue is shorter than the processing time
C.The maxDeliveryCount is set too high
D.The queue has sessions enabled
AnswerB

When the lock duration configured on the Service Bus queue is shorter than the actual time required for the Azure Function to fully process a message, the message's lock will expire prematurely. Upon expiration, the Service Bus makes the message available again to other consumers, even if the original function instance is still actively working on it. This scenario directly leads to duplicate processing, as another function instance or consumer can pick up and process the same message while the first attempt is still underway, resulting in redundant operations.

Why this answer

The most likely cause is that the lock duration on the Service Bus queue is shorter than the time required to process the message. When the lock expires, the message becomes visible to other consumers (or the same consumer on retry), causing it to be processed multiple times. The default lock duration for a Service Bus queue is 30 seconds, and if processing exceeds that, the message will be re-delivered.

Exam trap

The trap here is that candidates often confuse the function's timeout setting (which terminates the function) with the Service Bus lock duration (which controls message visibility), leading them to incorrectly select option A.

How to eliminate wrong answers

Option A is wrong because the function's timeout (default 5 minutes for the Consumption plan) controls how long the function can run before being terminated, but it does not directly cause duplicate processing; the message would still be locked during that time. Option C is wrong because maxDeliveryCount controls how many times a message can be delivered before being moved to the dead-letter queue, not the frequency of duplicate processing due to lock expiration. Option D is wrong because enabling sessions does not cause duplicate processing; sessions are used for message ordering and grouping, and they actually extend the lock duration automatically until the session is completed.

28
MCQhard

You are creating an Azure function that uses an output binding to write messages to an Azure Storage Queue. The function must ensure that messages are not lost if the function fails after writing to the queue. Which approach should you use?

A.Use a separate queue client SDK to write messages and handle errors manually.
B.Write to the queue directly in the function code and rely on the function's retry policy.
C.Use a durable function to orchestrate the writing and processing.
D.Use the queue output binding with a queue trigger input binding in the same function.
AnswerD

This ensures transactional consistency.

Why this answer

Using a queue output binding together with a queue trigger input binding leverages the Azure Functions runtime's transactional behavior. When a function has a queue trigger, the incoming message is kept in the queue until the function completes successfully. If the function fails after writing to the output queue (e.g., a crash or exception), the output binding write is rolled back (not committed), and the input message is not deleted from the source queue.

This ensures no message is lost: the output message is never written if the function fails, and the input message remains for retry. Without the queue trigger, if the function were triggered by another source (e.g., HTTP), a failure after the output write could still result in the output message being committed (since the function completes), but the context of the operation might be lost. The queue trigger input binding provides the necessary atomicity for this specific scenario.

Exam trap

The trap here is that candidates often assume direct SDK calls or retry policies provide sufficient reliability, but they overlook the atomic write guarantee that only output bindings with a trigger input binding provide in Azure Functions.

How to eliminate wrong answers

Option A is wrong because using a separate queue client SDK bypasses the built-in transactional guarantees of Azure Functions bindings, requiring manual error handling and risking message loss if the function fails after the SDK write. Option B is wrong because writing directly to the queue in function code and relying on the function's retry policy does not guarantee atomicity; if the function fails after the write, the message is already in the queue and cannot be rolled back. Option C is wrong because durable functions are designed for complex orchestration and state management, not for ensuring atomic message writes to a queue; they add unnecessary complexity and do not solve the specific transactional requirement.

29
MCQmedium

You are deploying a web app to Azure App Service that must use a custom domain with TLS/SSL. You have purchased an SSL certificate from a third-party CA. How should you upload and bind the certificate to the custom domain?

A.Place the certificate files in the wwwroot folder of the app and configure the web.config.
B.Import the certificate into Azure Key Vault and reference it from App Service.
C.Upload the .cer file to the App Service and let Azure generate the private key.
D.Upload the .pfx file to the App Service TLS/SSL settings and bind it to the custom domain.
AnswerD

Uploading the .pfx file directly to the App Service's TLS/SSL settings is the correct and most direct method for binding a custom SSL certificate. The .pfx (Personal Information Exchange) format is a cryptographic standard that securely bundles both the public key certificate and its corresponding private key, which are both critical for establishing a secure TLS connection. Once uploaded, the certificate can then be explicitly bound to the desired custom domain within the App Service configuration portal.

Why this answer

Azure App Service requires a .pfx file containing both the public certificate and the private key to bind a custom domain with TLS/SSL. The .pfx file is uploaded directly in the App Service's TLS/SSL settings, and then the certificate is bound to the custom domain, enabling HTTPS traffic.

Exam trap

The trap here is that candidates often confuse the need for a .pfx file (containing the private key) with a .cer file (public key only), or mistakenly think that placing certificate files in the app's file system is sufficient for TLS/SSL binding, when in fact App Service requires the certificate to be uploaded and bound at the platform level.

How to eliminate wrong answers

Option A is wrong because placing certificate files in the wwwroot folder and configuring web.config does not bind the certificate to the custom domain at the App Service platform level; this approach is used for client certificate authentication, not for TLS/SSL termination. Option B is wrong because while Azure Key Vault can store certificates, referencing it from App Service requires the certificate to be imported as an App Service Certificate or configured via a Key Vault reference in the app settings, not a direct upload and bind to the custom domain as described. Option C is wrong because a .cer file contains only the public key, not the private key, so Azure cannot generate the private key; the private key must be included in the upload for TLS/SSL binding.

30
MCQhard

You are designing a solution that uses Azure Functions to process events from Azure Event Hubs. The function must process events in order and exactly once per partition. What should you do?

A.Enable session state in the function app.
B.Use a Service Bus queue trigger with a singleton lock.
C.Disable checkpointing to ensure no duplicates.
D.Use the Event Hubs trigger for Azure Functions with default configuration.
AnswerD

The Azure Functions Event Hubs trigger, with its default configuration, is the ideal choice for processing Event Hubs events reliably and in order. It automatically handles partition management, ensuring that events within a single Event Hub partition are processed sequentially. Furthermore, it leverages built-in checkpointing to an Azure Storage account, which tracks the progress of event processing for each partition, enabling "at-least-once" delivery and facilitating "exactly-once" processing when combined with idempotent function logic.

Why this answer

The Event Hubs trigger for Azure Functions, by default, processes events in order and exactly once per partition. It uses checkpointing to track the offset of the last successfully processed event, ensuring that each event is processed only once and in sequence within a partition. This default behavior aligns with the requirement without needing additional configuration.

Exam trap

The trap here is that candidates may think they need to manually configure session state or disable checkpointing to achieve ordering and exactly-once processing, but the default Event Hubs trigger already handles this via partition-based ordering and checkpointing.

How to eliminate wrong answers

Option A is wrong because session state is a feature of Service Bus, not Event Hubs; it enables ordered processing of messages in a session, but Event Hubs partitions inherently provide ordering without session state. Option B is wrong because a Service Bus queue trigger with a singleton lock would not process events from Event Hubs; it is designed for Service Bus queues and does not support Event Hubs partitions or checkpointing. Option C is wrong because disabling checkpointing would cause the function to reprocess events from the beginning each time, leading to duplicates and loss of ordering, which contradicts the 'exactly once' requirement.

31
MCQhard

A company uses Azure Service Bus for messaging between microservices. They need to ensure that messages are processed in order within a partition. Which feature should they enable?

A.Duplicate detection
B.Partitioning
C.Sessions
D.Dead-letter queue
AnswerC

Azure Service Bus sessions enable the processing of related messages in a guaranteed First-In, First-Out (FIFO) order. By assigning a SessionId to messages, all messages belonging to that session are delivered to the same message receiver, ensuring sequential processing. This mechanism is essential for scenarios where the order of operations for a specific entity or conversation must be strictly maintained.

Why this answer

Sessions in Azure Service Bus provide strict message ordering and first-in-first-out (FIFO) guarantees within a session. By setting the SessionId property on messages, all messages with the same session ID are processed sequentially by a single receiver, ensuring order is preserved even across multiple partitions or competing consumers.

Exam trap

The trap here is that candidates often confuse partitioning with ordering, but partitioning alone does not guarantee order; sessions must be explicitly enabled to achieve FIFO processing within a partition.

How to eliminate wrong answers

Option A is wrong because duplicate detection prevents duplicate messages from being processed, but it does not enforce any ordering guarantees. Option B is wrong because partitioning improves throughput and scalability by distributing messages across multiple message brokers, but it does not guarantee order across partitions unless combined with sessions. Option D is wrong because a dead-letter queue is used to hold messages that cannot be processed successfully, not to enforce message ordering.

32
Multi-Selecteasy

Which TWO methods can you use to authenticate an Azure App Service web app to Azure SQL Database without storing credentials in code? (Choose two.)

Select 2 answers
A.Store the SQL connection string in Azure Key Vault and use a Key Vault reference in the app settings.
B.Enable a system-assigned managed identity on the App Service and grant it access to the database.
C.Use a connection string with a SQL username and password.
D.Use a service principal with a client secret stored in app settings.
E.Use a client certificate installed on the App Service.
AnswersA, B

This method significantly enhances security by storing sensitive connection strings and other secrets in Azure Key Vault, a robust, centralized secret management service. The App Service then uses Key Vault references (e.g., @Microsoft.KeyVault(SecretUri=...)) in its application settings. At runtime, the App Service securely resolves these references, fetching the secret directly from Key Vault without exposing it in configuration files or code, thus preventing hardcoding and simplifying credential rotation.

Why this answer

Azure App Service supports Key Vault references in application settings, allowing you to reference secrets stored in Azure Key Vault without hardcoding credentials. This pattern uses the Managed Service Identity (MSI) of the App Service to authenticate to Key Vault at runtime, retrieving the SQL connection string securely. Option B is correct because enabling a system-assigned managed identity on the App Service and granting it access to the Azure SQL Database via an Azure AD user or contained database user eliminates the need for any stored credentials, as the app authenticates directly to SQL using the managed identity token.

Exam trap

The trap here is that candidates often confuse 'storing credentials in code' with 'storing credentials in configuration' and may incorrectly select Option D (service principal with client secret) thinking it is secure, but the secret is still stored in app settings, which is not credential-free.

33
MCQmedium

Your company uses Microsoft Defender for Cloud. You need to receive alerts when a user modifies a Key Vault access policy. What should you configure?

A.Create an Azure Policy to audit access policy changes
B.Configure Microsoft Sentinel to monitor Key Vault
C.Enable Key Vault logging and query logs
D.Set up an activity log alert on the Key Vault
AnswerD

Setting up an activity log alert on the Key Vault is the most direct and efficient solution for real-time notification of control plane operations. Azure Activity Log alerts are specifically designed to trigger notifications or automated actions in response to events recorded in the Azure Activity Log, which captures management operations such as creating, updating, or deleting resources. By configuring an alert rule with specific criteria for Key Vault access policy write operations, immediate notifications can be delivered effectively.

Why this answer

Activity log alerts in Azure Monitor can be configured to trigger on specific administrative operations, such as 'Microsoft.KeyVault/vaults/accessPolicies/write'. This allows you to receive near real-time notifications when a Key Vault access policy is modified, directly addressing the requirement without additional services or complex setups.

Exam trap

The trap here is that candidates may overcomplicate the solution by choosing logging or SIEM options, not realizing that Azure Activity Log alerts provide a simple, built-in mechanism for monitoring control-plane changes like access policy modifications.

How to eliminate wrong answers

Option A is wrong because Azure Policy is used for enforcing compliance rules and auditing resource configurations at scale, not for generating real-time alerts on specific operations like access policy changes. Option B is wrong because Microsoft Sentinel is a SIEM solution that ingests and analyzes security data from multiple sources; while it can monitor Key Vault logs, it is overkill and not the simplest or most direct method for alerting on access policy modifications. Option C is wrong because enabling Key Vault logging and querying logs (e.g., via Log Analytics) provides historical data for analysis but does not inherently generate proactive alerts; you would need to set up an alert rule on the log query, which is more complex than an activity log alert.

34
MCQmedium

You are building a serverless application that processes images uploaded to an Azure Blob Storage container. When a new blob is added, an Azure Function (PowerShell) is triggered to generate a thumbnail and store it in a different container. The function must run with the least privilege necessary. The function uses a managed identity assigned to the function app. You need to grant the function access to read blobs from the source container and write blobs to the destination container. The storage account already has a private endpoint configured. What is the correct way to assign permissions?

A.Generate a SAS token for the source container with read permission and for the destination container with write permission, and store them in Key Vault for the function to retrieve.
B.Add the function app's managed identity to the storage account's Access Control (IAM) with the 'Storage Blob Data Owner' role on the entire storage account.
C.Add the function app's managed identity to the source container's Access Control (IAM) with the 'Storage Blob Data Reader' role, and to the destination container with the 'Storage Blob Data Contributor' role.
D.Use the storage account connection string in the function app settings and access the blobs using the connection string.
AnswerC

This option correctly implements the principle of least privilege by assigning specific roles at the container level. The 'Storage Blob Data Reader' role on the source container allows the function to retrieve images, while the 'Storage Blob Data Contributor' role on the destination container enables it to write processed images and potentially read/delete intermediate files. This granular access ensures the function has precisely the permissions needed without over-provisioning.

Why this answer

It uses Azure RBAC roles scoped to individual containers, granting the function app's managed identity exactly the permissions needed: 'Storage Blob Data Reader' for reading from the source container and 'Storage Blob Data Contributor' for writing to the destination container. This follows the principle of least privilege, avoids over-permissioning, and works seamlessly with private endpoints since RBAC does not depend on network paths.

Exam trap

The trap here is that candidates often choose the overly broad 'Storage Blob Data Owner' role (Option B) because they think it's simpler, but the question explicitly requires 'least privilege necessary,' making container-scoped roles the correct answer.

How to eliminate wrong answers

Option A is wrong because generating SAS tokens and storing them in Key Vault introduces unnecessary complexity and secret management overhead, and SAS tokens can be leaked or expire; managed identity with RBAC is simpler and more secure. Option B is wrong because assigning the 'Storage Blob Data Owner' role on the entire storage account grants far more permissions than needed (including full control over all containers and data), violating the least privilege requirement. Option D is wrong because using a storage account connection string embeds a shared key in the function app settings, which is a security risk (key exposure) and does not leverage managed identity; it also bypasses the private endpoint's network isolation benefits.

35
MCQmedium

An application calls a Event Grid event stream through HTTP. The developer must implement retries without overwhelming the remote system during partial outages. Which retry pattern is best?

A.Immediate infinite retries
B.Retry only after restarting the application
C.Disable all timeout settings
D.Exponential backoff with jitter and a maximum retry limit
AnswerD

This strategy is optimal for handling transient faults by progressively increasing the delay between retries, allowing the remote service time to recover without being overwhelmed. Jitter adds a random component to these delays, preventing a 'thundering herd' problem where multiple clients retry simultaneously and exacerbate the issue. The maximum retry limit ensures the application eventually gives up on persistent failures, conserving resources and enabling alternative error handling.

Why this answer

Exponential backoff with jitter and a maximum retry limit is the best pattern because it prevents overwhelming the Event Grid endpoint during partial outages by progressively increasing wait times between retries, while jitter randomizes those intervals to avoid thundering herd problems. The maximum retry limit ensures the system does not retry indefinitely, aligning with Event Grid's own retry policy (which uses exponential backoff up to 30 minutes and a max of 30 retries for HTTP 5xx errors). This balances resilience with resource protection.

Exam trap

The trap here is that candidates may think immediate retries or disabling timeouts are acceptable for reliability, but Azure explicitly recommends exponential backoff with jitter and a cap to protect both the client and the service from overload during outages.

How to eliminate wrong answers

Option A is wrong because immediate infinite retries would flood the Event Grid endpoint with requests during an outage, likely causing a thundering herd problem and potentially triggering rate limiting or denial-of-service conditions. Option B is wrong because retrying only after restarting the application introduces unnecessary downtime and fails to handle transient failures gracefully, as Event Grid expects clients to retry with backoff for HTTP 429 or 5xx responses. Option C is wrong because disabling all timeout settings removes critical safeguards, risking indefinite hangs and resource exhaustion, and does not address retry logic or backoff behavior.

36
MCQhard

Your company uses Azure API Management to expose APIs to external partners. You need to validate that each incoming request includes a valid JSON Web Token (JWT) issued by your Microsoft Entra ID tenant, and reject requests without valid tokens. What should you configure?

A.Configure an OAuth 2.0 authorization server in API Management
B.Require a subscription key for each API
C.Use an IP access restriction policy
D.Add a validate-jwt policy in the inbound processing policy
AnswerD

Adding a `validate-jwt` policy in the inbound processing policy is the correct and most effective method for enforcing JWT validation within Azure API Management. This policy is specifically designed to inspect the incoming request for a JWT, verify its signature against a configured public key or OpenID Connect discovery endpoint, and validate claims such as issuer, audience, and expiration. It ensures that only requests with valid, unexpired, and untampered tokens proceed to the backend API, rejecting invalid or missing tokens at the gateway.

Why this answer

The validate-jwt policy is the correct choice because it allows API Management to inspect the JWT token in the inbound request, verify its signature against the Microsoft Entra ID tenant’s keys, and enforce claims such as issuer and audience. This policy rejects requests with missing, expired, or invalid tokens, meeting the requirement to validate each incoming request.

Exam trap

The trap here is that candidates confuse configuring an OAuth 2.0 authorization server (which handles token issuance) with applying a policy to validate tokens on each request, leading them to pick Option A instead of the correct validate-jwt policy.

How to eliminate wrong answers

Option A is wrong because configuring an OAuth 2.0 authorization server in API Management defines how tokens are issued, but does not enforce validation of incoming tokens on each request; validation requires a policy like validate-jwt. Option B is wrong because requiring a subscription key validates API access via a key, not a JWT token, and does not verify identity or token validity. Option C is wrong because an IP access restriction policy filters requests based on source IP addresses, not on token presence or validity.

37
MCQhard

You have an Azure App Service web app that uses Azure SQL Database. The connection string is stored in Azure Key Vault. You need to automatically rotate the database password every 30 days without app downtime. Which solution should you implement?

A.Store the connection string as a Key Vault reference in App Service application settings and use Key Vault's auto-rotation.
B.Use Azure CLI to update the connection string in App Service settings.
C.Use Managed Identity to access SQL Database instead of a password.
D.Update the connection string in the application code and redeploy.
AnswerA

Key Vault reference updates automatically without restart.

Why this answer

Key Vault references in App Service application settings allow the web app to dynamically retrieve the connection string from Key Vault at runtime. By enabling Key Vault's auto-rotation feature (e.g., using a rotation function or event grid trigger), the database password can be rotated every 30 days without any app downtime, as the app reads the latest secret on each request or after a cached secret expires.

Exam trap

The trap here is that candidates may think Managed Identity (Option C) is a valid rotation solution, but it eliminates the password entirely rather than rotating it, failing the explicit requirement to rotate the database password every 30 days.

How to eliminate wrong answers

Option B is wrong because using Azure CLI to update the connection string in App Service settings would require a restart of the app service to pick up the new setting, causing downtime. Option C is wrong because while Managed Identity eliminates the need for a password, it does not address the requirement to rotate a password every 30 days; it replaces password-based authentication entirely. Option D is wrong because updating the connection string in the application code and redeploying would require a new deployment, causing downtime and violating the no-downtime requirement.

38
MCQeasy

Refer to the exhibit. You have a custom RBAC role definition. A user assigned this role reports they can read, write, and delete blobs, but cannot list the containers in the storage account. What is the most likely reason?

A.The role does not grant delete permissions on containers.
B.The role lacks dataActions for reading blobs.
C.The user does not have the Reader role on the storage account to navigate in the Azure portal.
D.The role does not include the action to list containers.
AnswerC

This is the correct answer because, even with specific data plane permissions granted by the custom role, the Azure portal requires control plane permissions to list and navigate resources. Without the "Reader" role (or equivalent) assigned at the storage account scope, the user cannot even view the storage account in the portal, preventing them from accessing its containers or blobs, regardless of their data plane access.

Why this answer

The user can perform blob operations (read, write, delete) because the custom RBAC role includes the necessary data actions (e.g., Microsoft.Storage/storageAccounts/blobServices/containers/blobs/*). However, listing containers requires the control plane action Microsoft.Storage/storageAccounts/blobServices/containers/read, which is not included in the role. Without the Reader role on the storage account (which grants this action), the user cannot list containers in the Azure portal, even though they can interact with blobs directly via tools that bypass the portal's container enumeration.

Exam trap

The trap here is that candidates assume blob read/write/delete permissions automatically include the ability to list containers, but Azure separates control plane and data plane permissions, and the portal specifically requires the Reader role for navigation.

How to eliminate wrong answers

Option A is wrong because the user can delete blobs, indicating delete permissions on blobs are granted; the issue is with listing containers, not deleting them. Option B is wrong because the user can read blobs, so dataActions for reading blobs are present; the problem is the lack of control plane action for listing containers. Option D is wrong because the role likely does not include the action to list containers (Microsoft.Storage/storageAccounts/blobServices/containers/read), but this is not the most likely reason given the user can perform blob operations; the core issue is that the portal requires the Reader role to navigate and list containers, which is a separate permission.

39
MCQmedium

Refer to the exhibit. An Azure OpenAI Service account is deployed with this ARM template. After deployment, a developer tries to call the OpenAI endpoint from an Azure App Service that has no public IP. The request is blocked. What change should be made to allow access?

A.Add a service tag for App Service in the ipRules.
B.Configure a private endpoint for the OpenAI account.
C.Change the defaultAction to Allow.
D.Add the App Service's outbound IP address to the ipRules.
AnswerB

Configuring a private endpoint for the Azure OpenAI account establishes a secure, private connection from your Azure Virtual Network to the OpenAI service. This solution ensures that traffic between your App Service, residing within a VNet, and the OpenAI service traverses the Microsoft backbone network privately, bypassing the public internet entirely. The private endpoint assigns a private IP address from your VNet to the OpenAI resource, allowing secure access and eliminating the need to expose the OpenAI service to public IP ranges or manage outbound IP addresses.

Why this answer

The ARM template sets `networkAcls.defaultAction` to `Deny`, which blocks all traffic by default. Since the App Service has no public IP, it cannot be reached via IP-based rules. Configuring a private endpoint for the OpenAI account creates a private network connection over Azure's backbone, bypassing the public endpoint and allowing the App Service to access the OpenAI service securely without requiring a public IP.

Exam trap

The trap here is that candidates often assume IP-based firewall rules (like adding outbound IPs) are sufficient, but they overlook that an App Service without a public IP cannot be reached via IP rules, and that private endpoints are the correct solution for private, secure access to PaaS services.

How to eliminate wrong answers

Option A is wrong because a service tag for App Service in `ipRules` would still require the App Service to have a public IP; service tags are used in network security groups, not in the `ipRules` property of an Azure OpenAI account's network ACLs, and the App Service has no public IP. Option C is wrong because changing `defaultAction` to `Allow` would open the OpenAI account to all public internet traffic, which is a security risk and does not solve the specific requirement of allowing access from a private App Service without a public IP. Option D is wrong because the App Service has no public IP, so adding its outbound IP address to `ipRules` is impossible; even if it had a public IP, the outbound IPs of an App Service can change (e.g., in multi-tenant scenarios), making this approach unreliable.

40
MCQhard

A company uses Azure API Management (APIM) to expose a set of REST APIs. A new requirement mandates that all API calls must be throttled per user based on usage tiers (Free, Basic, Premium). User identity is provided via a JWT token. Which policy should the developer configure in APIM to enforce this throttling?

A.rate-limit policy
B.rate-limit-by-key policy
C.quota-by-key policy
D.IP-based throttling
AnswerB

rate-limit-by-key can throttle based on a key extracted from JWT claims, enabling per-user throttling.

Why this answer

The rate-limit-by-key policy is correct because it allows throttling based on a specific key extracted from the request, such as the user identity from a JWT token. This policy enables per-user rate limiting by using a policy expression to extract the 'sub' claim or a custom claim from the JWT as the counter key, which maps directly to the usage tiers requirement.

Exam trap

Azure often tests the distinction between rate limiting (short-term, sliding window) and quota (long-term, fixed window), and the trap here is that candidates confuse 'quota-by-key' with 'rate-limit-by-key' because both use a key, but quota is for total usage over a month, not per-second throttling.

How to eliminate wrong answers

Option A is wrong because the rate-limit policy applies a single global rate limit to all requests, not per user or per key, and cannot differentiate based on JWT claims. Option C is wrong because the quota-by-key policy enforces a total number of calls over a longer period (e.g., daily, weekly, monthly), not a short-term rate limit per second/minute as required for throttling. Option D is wrong because IP-based throttling limits based on the caller's IP address, which does not reliably identify individual users behind shared IPs or NAT, and cannot leverage JWT-based user identity.

41
Multi-Selecthard

Which THREE are best practices for implementing an API using Azure API Management? (Choose three.)

Select 3 answers
A.Use policies to enforce throttling and quotas.
B.Implement caching policies to reduce backend load.
C.Use subscription keys for client authentication and rate limiting.
D.Use the Consumption tier for production APIs with custom domains.
E.Expose the backend service URLs directly to clients.
AnswersA, B, C

Azure API Management policies are XML-based configurations that can be applied at various scopes (global, product, API, operation). Throttling policies (e.g., `rate-limit-by-key`) prevent abuse by limiting the number of calls within a specified period, while quota policies (e.g., `quota-by-key`) restrict the total number of calls or bandwidth over a longer duration. These are crucial for protecting backend services from overload and ensuring fair usage among consumers.

Why this answer

A is correct because Azure API Management policies allow you to enforce throttling and quotas at the API level, protecting your backend from excessive traffic. By defining rate limits and quota policies, you can control the number of requests a client can make within a specified time window, ensuring fair usage and preventing abuse.

Exam trap

The trap here is that candidates may assume the Consumption tier is suitable for production APIs with custom domains, but it lacks custom domain support and other enterprise features, making it only appropriate for low-volume or development scenarios.

42
MCQhard

Refer to the exhibit. You are reviewing a role assignment for a managed identity. The JSON shows the role and scope. What access does this assignment grant?

A.Full management access to the storage account.
B.Read access to all containers in the storage account.
C.Read, write, and delete access to blobs in container c1.
D.Read-only access to blobs in container c1.
AnswerC

The Storage Blob Data Contributor role is designed to provide comprehensive data access for blobs. When this role is assigned at the scope of container c1, it grants the assigned principal the necessary permissions to perform read, write, and delete operations on blobs exclusively within that specific container. This aligns with the "Contributor" designation for blob data, enabling full manipulation of the blob contents.

Why this answer

The role assignment grants the 'Storage Blob Data Contributor' role at the scope of container 'c1'. This role provides read, write, and delete access to blob data within that specific container, but not management operations on the storage account itself. Option C correctly identifies this level of access.

Exam trap

The trap here is that candidates confuse the 'Storage Blob Data Contributor' role with read-only access (Option D) or assume it applies to the entire storage account (Option B), missing the critical scope restriction to container 'c1'.

How to eliminate wrong answers

Option A is wrong because 'Storage Blob Data Contributor' does not grant management access to the storage account (e.g., configuring firewall rules or changing replication); that requires roles like 'Contributor' or 'Owner' at the storage account scope. Option B is wrong because the scope is limited to container 'c1', not all containers in the storage account, and the role allows write/delete operations, not just read. Option D is wrong because the role includes write and delete permissions, not read-only access.

43
MCQmedium

You are building an application that subscribes to an Azure Event Grid topic using a custom webhook endpoint. The endpoint is a web API hosted on Azure App Service. You need to ensure that only Event Grid can invoke your webhook endpoint, preventing unauthorized requests. What should you implement in your webhook endpoint?

A.IP address filtering to allow only the Azure Event Grid service tag
B.Validate the Aeg-SasKey header against a shared secret known to Event Grid
C.Require a client certificate that you upload to Event Grid
D.Use an OAuth 2.0 token from Microsoft Entra ID
AnswerB

This is the recommended and most secure method for authenticating Event Grid webhook deliveries. Event Grid includes an Aeg-SasKey HTTP header in every event delivery request, containing a Shared Access Signature (SAS) key. Your webhook endpoint should validate this key against the access key configured for your Event Grid subscription. This cryptographic validation confirms that the request genuinely originated from your Event Grid topic or domain, ensuring the authenticity and integrity of the event delivery.

Why this answer

Event Grid sends an Aeg-SasKey header with each request to a custom webhook endpoint. By validating this header against a pre-configured shared secret (the same key used when creating the event subscription), the endpoint can confirm that the request originated from Event Grid. This prevents unauthorized actors from invoking the webhook, as they would not possess the shared secret.

Exam trap

The trap here is that candidates often assume IP whitelisting (Option A) is sufficient for security, but Event Grid's outbound IPs are not static or documented for custom webhooks, making this approach unreliable and unsupported.

How to eliminate wrong answers

Option A is wrong because IP address filtering using the Azure Event Grid service tag is not supported for custom webhook endpoints; Event Grid's outbound IP addresses can vary and are not published as a stable service tag for inbound validation. Option C is wrong because Event Grid does not support uploading client certificates for authentication to custom webhook endpoints; client certificate authentication is not a feature of Event Grid's webhook delivery. Option D is wrong because OAuth 2.0 tokens from Microsoft Entra ID are not natively supported by Event Grid for authenticating to custom webhook endpoints; Event Grid uses its own shared access signature (SAS) mechanism via the Aeg-SasKey header.

44
MCQmedium

A web app experiences intermittent high latency. You discover that the Azure SQL database is experiencing a high number of connection timeouts. The application uses Entity Framework Core with the default connection pooling settings. You need to improve database connection reliability without changing the application code. What should you do?

A.Set the Minimum Pool Size to 10 in the connection string.
B.Increase the maximum pool size in the connection string.
C.Set the Connection Lifetime to 300 seconds.
D.Enable Multipool in the connection string.
AnswerA

Intermittent high latency often indicates significant overhead associated with establishing new database connections. Setting the 'Min Pool Size' to a value like 10 ensures that at least ten connections are always kept open and ready in the connection pool, even when returned by the application. This significantly reduces the time required to acquire a connection during demand spikes, as new physical connections do not need to be created, directly mitigating latency caused by connection establishment.

Why this answer

Setting the Minimum Pool Size to 10 pre-creates a baseline of open connections in the pool, reducing the frequency of new connection creations during traffic spikes. This mitigates intermittent connection timeouts caused by the default pool starting empty and struggling to keep up with demand under high latency. Since the application uses Entity Framework Core with default pooling, this change is applied via the connection string without modifying code.

Exam trap

The trap here is that candidates often assume increasing the maximum pool size solves all connection issues, but the real problem is the delay in creating new connections from an empty pool, which is addressed by setting a minimum pool size.

How to eliminate wrong answers

Option B is wrong because increasing the maximum pool size only raises the cap on concurrent connections, but the intermittent timeouts are due to connections being created too slowly under load, not because the pool is full. Option C is wrong because setting Connection Lifetime to 300 seconds causes connections to be recycled after 5 minutes, which can actually increase churn and timeout risk during high latency, not improve reliability. Option D is wrong because 'Multipool' is not a valid connection string keyword in SQL Server or Entity Framework Core; it is a fabricated term.

45
MCQmedium

A web app running on Azure App Service must integrate with Microsoft Graph API to read user profiles. The app is registered in Microsoft Entra ID and uses the OAuth 2.0 authorization code flow. However, after deployment, the app fails to acquire tokens. What is the most likely cause?

A.The API permission for User.Read is not granted
B.The app is using the client credentials flow instead of authorization code flow
C.The redirect URI is not configured in the app registration
D.The client secret is expired
AnswerC

In the OAuth 2.0 authorization code flow, Azure AD redirects the user's browser back to a pre-registered redirect URI (also known as a reply URL) on the client application, carrying the authorization code. If this URI is not configured in the Azure AD app registration, or if it does not precisely match the URI used in the authorization request, Azure AD will refuse to issue the authorization code. This critical security measure prevents code interception and is a common cause for token acquisition failures during the initial authorization phase.

Why this answer

The OAuth 2.0 authorization code flow requires a redirect URI to be registered in the app registration in Microsoft Entra ID. This URI is where the authorization server sends the authorization code after user consent. If the redirect URI is missing or mismatched, the token acquisition fails because the authorization server cannot validate the callback endpoint, causing the authentication request to be rejected.

Exam trap

The trap here is that candidates often confuse token acquisition failures with permission or secret issues, overlooking the mandatory redirect URI registration requirement for the authorization code flow.

How to eliminate wrong answers

Option A is wrong because missing the User.Read API permission would cause the app to fail when calling Microsoft Graph after acquiring a token, but it would not prevent the token acquisition itself. Option B is wrong because the question explicitly states the app uses the authorization code flow, and using the client credentials flow would be a design choice, not a deployment failure cause. Option D is wrong because an expired client secret would cause token acquisition to fail with an 'invalid_client' error, but the question describes a scenario where the app fails after deployment, and a secret expiration is typically a runtime issue that would be caught during testing, not a misconfiguration that persists from deployment.

46
MCQeasy

A company uses Azure Functions to process messages from Azure Service Bus. The function needs to scale out during high load. Which consumption plan should you choose to enable automatic scaling?

A.Logic Apps plan
B.Premium plan
C.Consumption plan
D.App Service plan
AnswerC

The Consumption plan is the correct choice as it offers a truly serverless, event-driven execution model perfectly suited for processing messages from Azure Service Bus. This plan automatically scales resources dynamically from zero instances up to many, based on the volume of incoming messages or other event triggers, and you are billed only for the compute resources consumed during execution. This automatic, granular scaling ensures optimal cost efficiency and responsiveness for intermittent or variable workloads.

Why this answer

The Consumption plan is the correct choice because it automatically scales out based on the number of incoming messages from Azure Service Bus, adding function instances up to a maximum of 200 instances per function app. This plan is event-driven and provides true serverless scaling with no reserved capacity, making it ideal for handling variable workloads like Service Bus message processing.

Exam trap

The trap here is that candidates often confuse the Premium plan's automatic scaling with the Consumption plan's scaling, but the question explicitly asks for the plan that 'enables automatic scaling' in the context of serverless, and the Consumption plan is the foundational serverless plan with automatic scale-out, while Premium adds features like VNet integration and pre-warmed instances.

How to eliminate wrong answers

Option A is wrong because Logic Apps plan is not a valid Azure Functions hosting plan; Logic Apps is a separate integration service, not a consumption plan for Functions. Option B is wrong because the Premium plan, while offering automatic scaling and enhanced performance, is not the Consumption plan; it provides pre-warmed instances and VNet connectivity but incurs higher cost and is not the default serverless scaling option. Option D is wrong because the App Service plan (Dedicated) requires manual scaling or autoscale rules and does not provide the automatic, event-driven scaling of the Consumption plan; it also incurs cost for reserved instances even when idle.

47
MCQhard

You are designing a solution for a multi-tenant SaaS application where each tenant's data is stored in separate Azure SQL databases. You need to ensure that no tenant can access another tenant's database, even if the application is compromised. What should you implement?

A.Configure a server-level firewall rule for each tenant's IP range
B.Assign each tenant a managed identity with a dedicated SQL login and database-level permissions
C.Implement connection pooling with a single identity
D.Use a single database-level login and row-level security (RLS) to filter data
AnswerB

Assigning each tenant a dedicated managed identity, coupled with a unique SQL login and database-level permissions restricted to *only* that tenant's specific database, provides robust tenant isolation. Managed identities eliminate the need for managing credentials, enhancing security. By ensuring each tenant's application component authenticates with its own identity and possesses least privilege access solely to its designated database, this strategy effectively prevents cross-tenant data access even in the event of a compromise of one tenant's application instance.

Why this answer

Assigning each tenant a managed identity with a dedicated SQL login and database-level permissions ensures that even if the application is compromised, the attacker cannot access another tenant's database. Managed identities provide an Azure AD-backed identity for the application, and by mapping each tenant to a separate SQL login with permissions scoped to their specific database, you enforce tenant isolation at the database authentication and authorization layer. This prevents cross-tenant access because the application can only authenticate to the database corresponding to the tenant's managed identity.

Exam trap

The trap here is that candidates often confuse network-level security (firewall rules) or data-level filtering (RLS) with proper authentication and authorization isolation, failing to recognize that a compromised application with a shared identity can bypass both network and row-level controls.

How to eliminate wrong answers

Option A is wrong because server-level firewall rules control network access by IP address, not authentication or authorization; if the application is compromised, an attacker could still use the same IP range to access any tenant's database. Option C is wrong because connection pooling with a single identity means all tenants share the same SQL login, so if the application is compromised, the attacker could access all tenant databases using that single identity. Option D is wrong because using a single database-level login with row-level security (RLS) still allows the application to connect to all tenant data in the same database; RLS filters rows at query time but does not prevent an attacker from executing arbitrary queries that might bypass the filter or access other tenants' data if the application logic is compromised.

48
MCQmedium

You are monitoring an Azure Web App using Application Insights. You need to track the duration and status code of an external API call made by the app. Which Application Insights feature should you use?

A.Built-in request telemetry (server-side requests)
B.Dependency tracking feature
C.Custom events (TrackEvent)
D.Page view tracking
AnswerB

Dependency tracking is designed to automatically monitor and collect telemetry for outbound calls made by your application to external services, databases, or other APIs. It captures critical details such as the target dependency's name, call duration, success/failure status, and associated exception messages, providing crucial insights into external service performance. This feature is essential for understanding how your application interacts with and is affected by its external dependencies, enabling effective distributed tracing and troubleshooting.

Why this answer

Dependency tracking in Application Insights is specifically designed to monitor calls made by your application to external services, such as APIs, databases, or HTTP endpoints. It automatically captures the duration, success/failure status, and response code of outbound HTTP requests, making it the correct choice for tracking an external API call's duration and status code.

Exam trap

The trap here is that candidates confuse 'request telemetry' (incoming calls to the app) with 'dependency telemetry' (outgoing calls from the app), leading them to incorrectly select built-in request telemetry for monitoring external API calls.

How to eliminate wrong answers

Option A is wrong because built-in request telemetry (server-side requests) tracks incoming HTTP requests to your web app, not outbound calls to external APIs. Option C is wrong because custom events (TrackEvent) are used for logging custom business events or user actions, not for automatically capturing the duration and status code of HTTP calls. Option D is wrong because page view tracking monitors client-side page loads and user navigation, not server-side outbound API call metrics.

49
MCQhard

You are building a web application that uses Microsoft Entra ID for authentication. The application needs to call Microsoft Graph API to read user profiles and send emails on behalf of the signed-in user. You want to ensure that the user's consent is obtained only once and that the application can refresh tokens silently. Which OAuth 2.0 flow should you implement?

A.OAuth 2.0 Client Credentials flow.
B.OAuth 2.0 Implicit Grant flow.
C.OAuth 2.0 Authorization Code flow with PKCE (Proof Key for Code Exchange).
D.OAuth 2.0 Resource Owner Password Credentials (ROPC) flow.
AnswerC

This flow is secure for web apps, provides refresh tokens for silent renewal, and obtains user consent during the initial authentication. It is the recommended flow by Microsoft for web applications calling APIs on behalf of users.

Why this answer

The Authorization Code flow with PKCE is the recommended OAuth 2.0 flow for public client applications (like single-page apps or mobile apps) that need delegated access to Microsoft Graph. It allows the application to obtain an authorization code, exchange it for an access token and a refresh token, and use the refresh token to silently acquire new tokens without requiring the user to re-consent. This flow ensures that user consent is obtained only once and supports silent token refresh, meeting the requirements.

Exam trap

The trap here is that candidates often confuse the Client Credentials flow (which is for app-only access) with delegated user scenarios, or they mistakenly think the Implicit Grant flow is still acceptable for modern apps, ignoring the fact that it lacks refresh token support and is deprecated by Microsoft.

How to eliminate wrong answers

Option A is wrong because the Client Credentials flow is used for server-to-server (daemon) scenarios where no user is involved, so it cannot obtain consent from a signed-in user or send emails on behalf of the user. Option B is wrong because the Implicit Grant flow is deprecated and does not support refresh tokens, making silent token refresh impossible; it also exposes tokens in the URL, posing security risks. Option D is wrong because the Resource Owner Password Credentials flow requires the user to provide their credentials directly to the application, which is not recommended for modern applications due to security concerns and does not support refresh tokens for silent renewal in all scenarios.

50
MCQmedium

You are implementing an order processing system using Azure Durable Functions. The function must send notifications to multiple channels (email, SMS, push) in parallel and wait for all to complete before sending a confirmation. Which Durable Functions feature should you utilize?

A.Orchestration trigger with fan-out/fan-in pattern
B.Entity trigger
C.Activity trigger with retry policy
D.Timer trigger
AnswerA

The Orchestration trigger with a fan-out/fan-in pattern is the ideal choice for an order processing system. This pattern allows an orchestrator function to concurrently invoke multiple activity functions (e.g., inventory check, payment processing, shipping label generation) using `Task.WhenAll` to await their collective completion. After all parallel tasks finish, the orchestrator aggregates their results before proceeding, ensuring efficient and coordinated execution of complex, multi-step workflows.

Why this answer

The fan-out/fan-in pattern in Durable Functions allows you to invoke multiple activity functions in parallel (fan-out) and then wait for all of them to complete (fan-in) using `Task.WhenAll`. This is exactly what is needed to send notifications to email, SMS, and push simultaneously and then proceed only after all have finished, making option A correct.

Exam trap

The trap here is that candidates often confuse the fan-out/fan-in pattern with simple parallel execution using Entity triggers or assume that retry policies alone can coordinate multiple channels, but only the orchestration trigger with `Task.WhenAll` provides the required synchronization barrier.

How to eliminate wrong answers

Option B is wrong because Entity triggers are designed for managing stateful entities (like counters or actors) and are not suited for orchestrating parallel task execution with a completion barrier. Option C is wrong because an Activity trigger with retry policy handles individual task retries but cannot coordinate multiple parallel activities or wait for all to finish before proceeding. Option D is wrong because Timer triggers are for scheduled or periodic execution, not for orchestrating parallel workflows with a fan-in step.

51
Matchingmedium

Match each Azure DevOps component to its function.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Git repositories for source control

CI/CD for building and deploying code

Agile project management with Kanban boards

Package management for Maven, npm, NuGet

Why these pairings

Correct matches: Azure Boards tracks work items, Azure Repos hosts source code, Azure Pipelines automates builds and deployments. Common confusions include mixing up Boards with Repos, or Repos with Pipelines.

52
MCQeasy

A company uses Azure Functions with a consumption plan. The function processes messages from a queue. During peak hours, the function takes longer to execute, and some messages are processed twice. What is the most likely cause?

A.The function timeout is set too low.
B.The queue message visibility timeout is shorter than the function processing time.
C.The function uses blob output binding incorrectly.
D.The function app is using a premium plan instead of consumption.
AnswerB

When the queue message visibility timeout is shorter than the actual function processing time, the message becomes visible again in the queue before the initial function instance has successfully completed its work and deleted the message. This allows another available function instance, potentially on a different host, to pick up and process the exact same message. This concurrent processing of the same message by multiple instances is the direct cause of duplicate operations.

Why this answer

In Azure Functions with a consumption plan, the queue message visibility timeout determines how long a message is invisible to other consumers after being dequeued. If the function's processing time exceeds this visibility timeout, the message becomes visible again and can be picked up by another function instance, leading to duplicate processing. This is the most likely cause of messages being processed twice during peak hours when execution times increase.

Exam trap

The trap here is that candidates often confuse the function timeout (which terminates execution) with the queue visibility timeout (which controls message re-delivery), leading them to incorrectly select option A.

How to eliminate wrong answers

Option A is wrong because the function timeout (default 5 minutes for consumption plan) controls the maximum execution duration, not message visibility; a low timeout would cause the function to fail or be terminated, not duplicate processing. Option C is wrong because incorrect blob output binding would cause errors or missing data, not duplicate message processing. Option D is wrong because a premium plan provides dedicated instances and faster execution, which would reduce the likelihood of timeouts and duplicates, not cause them.

53
MCQmedium

You need to store large amounts of unstructured data (images and videos) that are accessed rarely (a few times per year) but must be available within minutes when requested. The data must be geo-redundant for disaster recovery. You want to minimize storage costs. Which storage tier and redundancy option should you choose?

A.Hot storage tier with geo-redundant storage (GRS)
B.Cool storage tier with geo-redundant storage (GRS)
C.Archive storage tier with read-access geo-redundant storage (RA-GRS)
D.Premium storage tier with local redundant storage (LRS)
AnswerB

The Cool storage tier is an optimal choice for infrequently accessed data, such as images and videos, providing a balance between storage cost and immediate availability. Data stored in the Cool tier can be accessed within minutes, aligning with the requirement for quick retrieval. Coupled with Geo-Redundant Storage (GRS), it ensures robust disaster recovery by replicating data to a secondary Azure region, offering a cost-effective solution that meets both availability and redundancy needs.

Why this answer

The Cool storage tier is designed for data that is infrequently accessed (a few times per year) and stored for at least 30 days, offering lower storage costs than Hot tier while still providing low-latency retrieval within minutes. Geo-redundant storage (GRS) replicates data to a paired secondary region, ensuring disaster recovery with geo-redundancy. This combination meets the requirements of rare access, minutes-availability, geo-redundancy, and minimal cost.

Exam trap

The trap here is that candidates often confuse the Archive tier's low storage cost with its high retrieval latency (hours), forgetting the requirement for data to be available within minutes, or they overlook that GRS is sufficient for geo-redundancy without needing read-access (RA-GRS).

How to eliminate wrong answers

Option A is wrong because the Hot storage tier has higher storage costs than Cool tier, making it suboptimal for rarely accessed data. Option C is wrong because the Archive storage tier has the lowest storage cost but retrieval times can take hours (up to 15 hours for standard priority), not minutes, and RA-GRS is unnecessary since read access is not required. Option D is wrong because Premium storage tier is optimized for low-latency, high-performance workloads (e.g., VMs, databases) and uses local redundant storage (LRS), which does not provide geo-redundancy for disaster recovery.

54
MCQeasy

Your company develops a multi-tenant SaaS application hosted on Azure Kubernetes Service (AKS). Each tenant has isolated compute resources. You need to ensure that no single tenant can consume all cluster resources and affect others. You also want to optimize resource utilization by packing pods efficiently. You evaluate the following approaches: A) Use namespace resource quotas per tenant and let the Kubernetes scheduler handle packing. B) Deploy each tenant to a separate AKS cluster. C) Use Azure Policy to enforce pod resource limits. D) Use a service mesh to control traffic between tenants. Which approach should you recommend?

A.Use namespace resource quotas per tenant and let the Kubernetes scheduler handle packing.
B.Use a service mesh to control traffic between tenants.
C.Use Azure Policy to enforce pod resource limits.
D.Deploy each tenant to a separate AKS cluster.
AnswerA

Using namespace resource quotas per tenant is the most effective and efficient strategy for multi-tenant SaaS applications on Kubernetes. By assigning each tenant a dedicated namespace with a ResourceQuota, you define the maximum aggregate CPU, memory, and storage resources that all pods within that tenant's namespace can consume. The Kubernetes scheduler then intelligently places pods across available nodes, optimizing resource utilization and ensuring fair sharing while preventing any single tenant from monopolizing cluster resources. This approach provides strong logical isolation and cost efficiency.

Why this answer

Namespace resource quotas per tenant provide hard limits on compute resources (CPU, memory) and object counts, preventing any single tenant from exhausting cluster resources. The Kubernetes scheduler then efficiently packs pods within those quotas, optimizing utilization without manual intervention. This approach balances isolation and resource efficiency in a multi-tenant AKS environment.

Exam trap

The trap here is that candidates confuse Azure Policy (which enforces pod-level limits) with namespace-level resource quotas, missing that quotas are the correct mechanism for tenant-level aggregate resource isolation in a shared cluster.

How to eliminate wrong answers

Option B is wrong because deploying each tenant to a separate AKS cluster increases operational complexity and cost, and does not optimize resource utilization—idle resources in one cluster cannot be shared with another. Option C is wrong because Azure Policy can enforce pod resource limits (e.g., via built-in policies like 'Kubernetes cluster containers should have CPU and memory resource limits defined'), but it does not provide tenant-level resource quotas or prevent a tenant from consuming all cluster resources across namespaces; it only ensures individual pods have limits, not aggregate tenant consumption. Option D is wrong because a service mesh (e.g., Istio, Linkerd) controls east-west traffic between services, not resource consumption or isolation; it addresses network segmentation and observability, not compute resource guarantees.

55
MCQmedium

You deploy a web application in Azure App Service. You need to authenticate users via Microsoft Entra ID (Microsoft Entra ID) with minimal custom code. Which App Service feature should you configure?

A.App Service Authentication (Easy Auth)
B.Microsoft Entra ID B2C
C.Application Gateway with WAF
D.App Service Managed Identity
AnswerA

App Service Authentication, often called Easy Auth, provides a built-in, declarative way to secure your web application by offloading user authentication to the App Service platform. It integrates seamlessly with identity providers like Microsoft Entra ID, allowing your application to authenticate enterprise users without writing any authentication-related code. This significantly reduces development effort and enhances security by centralizing identity management at the platform level.

Why this answer

App Service Authentication (also known as Easy Auth) is the correct choice because it provides a turnkey authentication layer that integrates directly with Microsoft Entra ID. It requires minimal custom code by handling the OAuth 2.0 authorization code flow, token validation, and session management at the App Service platform level, allowing you to simply configure the identity provider in the Azure portal.

Exam trap

The trap here is that candidates confuse Managed Identity (which is for server-to-server resource access) with user authentication, or they overcomplicate the solution by choosing B2C when the requirement is simply to authenticate against an existing Microsoft Entra ID tenant with minimal code.

How to eliminate wrong answers

Option B (Microsoft Entra ID B2C) is wrong because it is designed for customer-facing applications with external identity providers and social logins, not for authenticating users via an existing Microsoft Entra ID tenant with minimal code; it adds unnecessary complexity and custom policy configuration. Option C (Application Gateway with WAF) is wrong because it is a layer 7 load balancer and web application firewall that does not provide any authentication or token validation for Microsoft Entra ID; it focuses on traffic routing and security filtering, not identity. Option D (App Service Managed Identity) is wrong because it is used to grant the app itself an identity to securely access other Azure resources (e.g., Key Vault, Storage), not to authenticate external users; it does not handle user login or token issuance.

56
MCQmedium

You are developing a solution that uses Azure Container Registry (ACR) to store Docker images. You need to ensure that only authorized users can deploy images from ACR to an AKS cluster. What should you do?

A.Configure AKS RBAC to limit image pull permissions.
B.Use Kubernetes secrets to store ACR credentials.
C.Use the AKS cluster's managed identity with AcrPull role assignment.
D.Enable the admin account on ACR and use the credentials in AKS.
AnswerC

Managed identity provides secure access without secrets.

Why this answer

Using an AKS cluster's managed identity with the AcrPull role assignment enables secure, password-less authentication to ACR. Option A is incorrect because AKS RBAC controls Kubernetes resources, not ACR permissions. Option B is incorrect because storing ACR credentials as Kubernetes secrets is less secure and requires manual management.

Option D is incorrect because enabling the admin account on ACR is a shared credential approach that is not recommended for production.

57
MCQmedium

You deploy the above policy to an Azure API Management API. What is the effect?

A.Limits the total bandwidth to 100 MB per 60 seconds.
B.Limits the API to 100 calls per 60 seconds from the backend.
C.Limits the API to 100 calls per 60 seconds per subscription key.
D.Limits the API to 100 calls per 60 seconds per client IP address.
AnswerC

This statement is correct. The `rate-limit` policy, when configured without a `by` attribute, defaults to applying the limit based on the subscription key provided in the client request. This means that each unique subscription key is independently allowed to make up to 100 calls within a 60-second period. This behavior ensures fair usage across different consumers of the API.

Why this answer

The policy shown is a rate-limit policy in Azure API Management that uses the `rate-limit-by-key` element with a `counter-key` attribute set to `@(context.Subscription.Key)`. This limits the number of calls per subscription key, not per IP or backend. The `calls` attribute is set to 100 and the `renewal-period` is 60 seconds, so it enforces 100 calls per 60 seconds per subscription key.

Exam trap

The trap here is that candidates confuse `rate-limit-by-key` (which resets every renewal period) with `quota-by-key` (which accumulates over a longer period), or they misidentify the counter-key as the client IP address instead of the subscription key.

How to eliminate wrong answers

Option A is wrong because the policy limits call count, not bandwidth (data transfer); bandwidth limits are enforced using `quota-by-key` with a `bandwidth` attribute, not `calls`. Option B is wrong because the counter-key is based on the subscription key, not the backend; backend-level limits would require a different policy or configuration. Option D is wrong because the counter-key is explicitly set to `@(context.Subscription.Key)`, not the client IP address; IP-based rate limiting would use `@(context.Request.IpAddress)` as the counter-key.

58
MCQmedium

Your e-commerce application sends telemetry to Application Insights. You need to reduce ingestion costs while preserving the ability to detect trends in performance metrics. Which sampling type should you configure?

A.Fixed-rate sampling
B.Adaptive sampling
C.Ingestion sampling
D.Head-based sampling
AnswerB

Adaptive sampling dynamically adjusts the sampling rate based on the current telemetry volume and a configured target data ingestion rate. This intelligent approach ensures that the total volume of collected telemetry remains within a manageable budget, preventing excessive costs while still capturing a statistically representative dataset. By continuously monitoring and adapting, it effectively preserves the statistical accuracy needed for trend analysis and anomaly detection across varying application loads.

Why this answer

Adaptive sampling is the correct choice because it automatically adjusts the volume of telemetry data collected based on the application's activity level, ensuring that performance trends are preserved while reducing ingestion costs. Unlike fixed-rate sampling, adaptive sampling dynamically increases or decreases the sampling rate to maintain a target volume, making it ideal for e-commerce applications with variable traffic patterns.

Exam trap

The trap here is that candidates often confuse 'adaptive sampling' with 'fixed-rate sampling' because both are head-based, but only adaptive sampling dynamically adjusts to reduce costs without losing trend visibility.

How to eliminate wrong answers

Option A is wrong because fixed-rate sampling applies a constant sampling percentage regardless of traffic volume, which can either over-sample during low activity (wasting cost) or under-sample during high activity (losing trend data). Option C is wrong because ingestion sampling occurs at the ingestion endpoint after telemetry is sent, meaning it does not reduce network bandwidth or storage costs at the source, and it cannot preserve trends as effectively as client-side sampling. Option D is wrong because head-based sampling is a general category that includes fixed-rate and adaptive sampling; it is not a specific sampling type, and the question asks for a specific configuration that reduces costs while preserving trends.

59
MCQhard

Your company is migrating a legacy on-premises .NET Framework 4.7.2 web application to Azure. The application uses session state stored in-memory and reads/writes to a local SQL Server database. The migration must minimize code changes, support auto-scaling, and handle session state across multiple instances. You plan to use Azure App Service with Windows OS. You need to recommend a solution for session state storage and database connectivity. Which option should you choose?

A.Use Azure Cache for Redis as the session state provider via the RedisSessionStateProvider NuGet package, and configure the database connection string in Azure App Service App Settings.
B.Store session state in Azure Table Storage using a custom session state provider, and use a connection string for Azure SQL Database.
C.Configure session state using Azure SQL Database with a session state database, and update the connection string in web.config.
D.Use App Service's built-in session state with ARR affinity and connect to Azure SQL Database using Managed Identity.
AnswerA

Azure Cache for Redis provides a highly performant, scalable, and distributed cache solution ideal for managing session state in cloud environments. The `RedisSessionStateProvider` NuGet package integrates seamlessly with existing ASP.NET applications, requiring minimal code changes to leverage this robust backend. Configuring the connection string in Azure App Service App Settings ensures secure management, easy updates without redeploying, and supports auto-scaling effectively by centralizing session data.

Why this answer

Azure Cache for Redis provides a distributed, in-memory session state provider that supports session state sharing across multiple App Service instances without requiring code changes to the application logic. The RedisSessionStateProvider NuGet package is a drop-in replacement for the default in-memory provider, and configuring the database connection string in App Settings allows you to change the target without modifying web.config, minimizing migration effort.

Exam trap

The trap here is that candidates often confuse ARR affinity with a valid session state solution, not realizing that it prevents horizontal scaling by forcing requests to a single instance, which contradicts the auto-scaling requirement.

How to eliminate wrong answers

Option B is wrong because Azure Table Storage is a NoSQL key-value store that does not natively support session state expiration or locking, and implementing a custom provider would require significant code changes, contradicting the requirement to minimize code changes. Option C is wrong because using Azure SQL Database for session state introduces higher latency and cost compared to an in-memory cache, and it requires updating web.config rather than using App Settings, which is less flexible for auto-scaling scenarios. Option D is wrong because ARR affinity (sticky sessions) prevents true auto-scaling by pinning a user to a specific instance, and while Managed Identity is good for database connectivity, it does not solve the session state sharing problem across instances.

60
MCQmedium

Refer to the exhibit. You are deploying an Azure Key Vault using this ARM template. Your team plans to use RBAC to manage access. The vault must be accessible from Azure services (e.g., Azure VMs) without public IP addresses. After deployment, a developer reports that they cannot access secrets from a VM in the same region, even though the VM has a managed identity with the Key Vault Secrets User role. What is the most likely cause?

A.Soft delete is enabled, which prevents access to secrets until they are recovered.
B.The accessPolicies array is empty, so RBAC is not working.
C.The vault name is not unique and conflicts with another vault.
D.The vault's network ACLs block all traffic except from Azure services, but VMs are not considered Azure services.
AnswerD

The vault's network ACLs are configured with `defaultAction: Deny` and `bypass: AzureServices`, meaning only traffic from specific Microsoft trusted services can access the vault. Azure Virtual Machines (VMs) are customer-deployed resources within a virtual network, not considered part of the 'Azure services' bypass group for Key Vault network access. Consequently, direct access from a VM requires explicit configuration via virtual network rules or a private endpoint to be permitted.

Why this answer

The ARM template's network ACLs are configured with a default action of 'Deny' and an exception for 'AzureServices' only. Azure VMs without public IP addresses are not considered part of the 'AzureServices' bypass category; that category is reserved for Azure platform services like Azure Resource Manager or Azure Policy, not for compute instances. Therefore, the VM's traffic is blocked by the firewall, even though it has a managed identity with the correct RBAC role.

Exam trap

The trap here is that candidates assume 'Azure services' includes all Azure resources like VMs, but in Key Vault network ACLs, it specifically refers to a limited set of platform services, not customer-deployed compute instances.

How to eliminate wrong answers

Option A is wrong because soft delete does not prevent access to secrets; it only adds a retention period after deletion, and secrets are fully accessible until explicitly deleted. Option B is wrong because the accessPolicies array being empty is irrelevant when using RBAC; RBAC is independent of access policies and is enabled at the vault level via the 'enableRbacAuthorization' property (not shown here, but RBAC is planned). Option C is wrong because vault name uniqueness is enforced globally by Azure; a conflict would cause a deployment failure, not a runtime access issue.

61
Multi-Selecteasy

Your company is migrating a monolithic application to Azure. The application consists of several components that need to be deployed and scaled independently. You need to design a container orchestration solution. Which TWO services should you consider?

Select 2 answers
A.Azure Container Instances
B.Azure Container Apps
C.Azure Batch
D.Azure Service Fabric
E.Azure Kubernetes Service (AKS)
AnswersB, E

Azure Container Apps is an excellent choice for migrating monolithic applications to a microservices architecture, offering a serverless platform for running containerized applications. It provides built-in capabilities for HTTP/HTTPS ingress, event-driven scaling, and Dapr integration, simplifying the deployment and management of microservices without the operational overhead of a full Kubernetes cluster. Its focus on independent scaling and revision management makes it ideal for modern application patterns.

Why this answer

Azure Container Apps (B) is correct because it provides a serverless container orchestration platform that allows you to deploy and scale microservices independently without managing the underlying Kubernetes infrastructure. It supports event-driven scaling, revision management, and split traffic routing, making it ideal for migrating monolithic applications to a microservices architecture with minimal operational overhead.

Exam trap

The trap here is that candidates often confuse Azure Container Instances (ACI) with a full orchestration solution, but ACI lacks the multi-container scaling and service discovery features required for independent component deployment, while Azure Kubernetes Service (AKS) is the correct choice for full control over Kubernetes, and Container Apps offers a managed abstraction layer.

62
MCQeasy

You are developing a web application that allows users to upload profile pictures to Azure Blob Storage. The application generates thumbnails using an Azure Function that is triggered by blob creation. You need to ensure that the function only processes image files and ignores other file types. What should you do?

A.Set the trigger's 'source' parameter to 'EventGrid' and filter events by the 'content-type' property.
B.Set the trigger's 'filter' property to '*.jpg,*.png'.
C.Implement the function without filtering and check the content type inside the function, ignoring non-image blobs.
D.Use the blob trigger with a path pattern like 'images/{name}.jpg' and 'images/{name}.png' and use the extension binding to filter.
AnswerA, C

Correct. By setting the trigger source to EventGrid and filtering events by the 'content-type' property (e.g., 'image/jpeg', 'image/png'), the function only triggers for image blobs, avoiding unnecessary invocations for other file types.

Why this answer

Both options A and C are valid methods to ensure the Azure Function only processes image files. Option A uses an Event Grid trigger with filtering on the 'content-type' property, which allows the function to only run for blobs with image content types. Option C checks the content type inside the function and ignores non-image blobs, which also works but runs the function for all blobs.

Option B is incorrect because blob triggers do not have a 'filter' property for extensions. Option D is incorrect because the blob trigger's path pattern does not filter by extension; the function triggers for any blob in the container regardless of the file extension.

Exam trap

Candidates often mistakenly believe that blob trigger path patterns can filter by file extension (Option D), but in reality, the trigger fires for any blob in the container regardless of the pattern. The correct approaches are either using Event Grid trigger with content-type filtering or checking the content type inside the function.

How to eliminate wrong answers

Option A is wrong because the 'source' parameter for EventGrid is not a standard property on a Blob trigger; EventGrid-based triggers use a separate EventGrid trigger type, and filtering by 'content-type' would require custom event filtering logic, not a simple parameter. Option B is wrong because the 'filter' property does not exist on a Blob trigger binding; the binding only supports path patterns with curly braces for name and extension, not a comma-separated list of extensions. Option C is wrong because while it would work functionally, it is not the recommended approach; the question asks what you 'should do' to ensure the function only processes image files, and using built-in path pattern filtering is more efficient and avoids unnecessary invocations.

63
MCQmedium

You are deploying a containerized application to Azure Container Instances. The container image is stored in a private Azure Container Registry (ACR). You need to ensure that ACI can pull the image without storing credentials in the container group definition. What should you use?

A.Enable managed identity for the container group and assign the AcrPull role.
B.Generate a SAS token for the ACR and use it in the image registry credential.
C.Create a service principal with AcrPull role and pass its credentials.
D.Use the ACR admin account and provide the credentials in the container group.
AnswerA

Enabling a managed identity for the Azure Container Instance (ACI) container group provides an Azure Active Directory identity that the ACI can use to authenticate. By assigning the AcrPull role to this managed identity on the Azure Container Registry (ACR), ACI can securely pull images without requiring any explicit credentials to be stored or managed within the container group definition. This eliminates the risk of credential exposure and simplifies credential rotation, adhering to the principle of least privilege.

Why this answer

Enabling a managed identity for the container group and assigning the AcrPull role allows Azure Container Instances to authenticate to Azure Container Registry using Azure AD without storing any credentials in the container group definition. The managed identity is automatically authenticated by Azure, and ACR supports token exchange via Azure AD, so ACI can pull the image securely without embedding secrets.

Exam trap

The trap here is that candidates often confuse SAS tokens (which are for Azure Storage) with ACR authentication, or they assume that a service principal is acceptable even though it requires embedding credentials, missing the managed identity option that eliminates credential storage entirely.

How to eliminate wrong answers

Option B is wrong because SAS tokens are used for delegated access to Azure Storage (blobs, files, queues, tables), not for authenticating to Azure Container Registry; ACR does not support SAS tokens for image pull operations. Option C is wrong because while a service principal with AcrPull role can authenticate to ACR, it requires passing the service principal's credentials (client ID and secret) in the container group definition, which violates the requirement of not storing credentials. Option D is wrong because using the ACR admin account requires providing the admin username and password directly in the container group definition, which stores credentials in the deployment artifact and is a security anti-pattern.

64
Multi-Selecteasy

Which TWO Azure services can be used to store and manage secrets, such as API keys and connection strings? (Choose 2)

Select 1 answer
A.Azure Key Vault
B.Azure App Configuration
C.Azure Storage
D.Azure SQL Database
E.Azure Managed Identity
AnswersA

Azure Key Vault is designed for secure secret storage and management, making it the correct choice.

Why this answer

Azure Key Vault is the dedicated service for securely storing and managing secrets, keys, and certificates. Managed Identity, on the other hand, is an authentication mechanism that provides an identity for Azure resources to access secrets stored elsewhere, such as Key Vault. It does not store secrets itself.

Therefore, only Azure Key Vault qualifies as a service for storing and managing secrets among the given options.

Exam trap

The trap here is that candidates often confuse Azure App Configuration (which can store configuration values but not secrets securely) with Azure Key Vault, or they mistakenly think Managed Identity is a secret store when it is actually an authentication mechanism for accessing secrets.

65
MCQeasy

You are using Application Insights to monitor a web application. You notice that a specific request is slow. You want to see the complete end-to-end transaction details, including all dependency calls and exceptions for that single request. Which feature should you use?

A.Metrics Explorer
B.Transaction Search (End-to-End Transaction Details)
C.Application Map
D.Live Metrics Stream
AnswerB

Transaction Search, specifically the End-to-End Transaction Details view, is the primary tool in Application Insights for investigating the full lifecycle of an individual request. It presents a chronological timeline of all operations, dependencies, and logs associated with a specific transaction, allowing developers to trace the flow across different components, identify bottlenecks, and understand the exact sequence of events that led to a particular outcome or performance issue. This granular view is crucial for root cause analysis.

Why this answer

Transaction Search (End-to-End Transaction Details) is the correct feature because it allows you to view the complete trace of a single request, including all dependency calls (e.g., SQL, HTTP, Azure services), exceptions, and logs associated with that specific operation. This is achieved by correlating telemetry using the operation_Id field, which groups all telemetry items from the same request into a single end-to-end view. Other features like Metrics Explorer or Application Map provide aggregated or topological views, not per-request drill-down.

Exam trap

The trap here is that candidates often confuse the aggregated monitoring features (Metrics Explorer, Application Map) with the diagnostic drill-down capability of Transaction Search, mistakenly believing that a high-level view can reveal per-request details.

How to eliminate wrong answers

Option A is wrong because Metrics Explorer provides aggregated, time-series metrics (e.g., average response time, request count) and cannot show individual request-level details or dependency call trees. Option C is wrong because Application Map offers a topological view of application components and their dependencies, but it does not provide per-request transaction details or exception traces. Option D is wrong because Live Metrics Stream shows real-time, near-instantaneous metrics (e.g., request rate, CPU usage) for monitoring live traffic, but it does not support querying historical or specific slow requests with full dependency and exception details.

66
MCQhard

Your company uses Azure API Management to expose APIs to external partners. You need to implement rate limiting per subscription key to prevent abuse, but you also want to allow burst traffic up to a certain limit. Which policy should you configure?

A.Add a 'quota-per-key' policy with a renewal period of 1 day.
B.Add a 'limit' policy with a condition on subscription key.
C.Add a 'rate-limit-by-key' policy with a counter key of 'subscription-key'.
D.Add a 'rate-limit' policy with a renewal period of 60 seconds and a burst count of 10.
AnswerD

The 'rate-limit' policy supports both a steady-state rate limit and an optional burst count, making it suitable for this scenario.

Why this answer

The 'rate-limit' policy in Azure API Management allows you to set a rate limit (e.g., requests per 60 seconds) with a burst count, enabling short bursts of traffic beyond the steady-state limit. When applied at the product scope, it effectively enforces per-subscription throttling, meeting the requirement to prevent abuse while allowing burst traffic.

Exam trap

The trap here is that candidates often confuse 'rate-limit' (which supports burst) with 'rate-limit-by-key' (which does NOT support burst and is typically used for custom keys like IP addresses or user IDs), or 'quota-per-key' (which does not support burst and operates over longer periods). Another common mistake is assuming any rate-limit policy inherently allows bursts without explicitly configuring the 'burst-count' parameter.

How to eliminate wrong answers

Option A is wrong because 'quota-per-key' enforces a total number of calls over a longer period (e.g., per day), not a per-second or burst-aware rate limit, and does not allow burst traffic within short intervals. Option B is wrong because there is no generic 'limit' policy in Azure API Management; the correct policy names are 'rate-limit' and 'rate-limit-by-key', and a condition on subscription key is not a standalone policy. Option C is wrong because 'rate-limit-by-key' with a counter key of 'subscription-key' is the correct policy for per-key rate limiting, but the option omits the burst count configuration, which is essential for allowing burst traffic; without specifying a burst, the policy enforces a strict rate limit without burst allowance.

67
MCQeasy

A web app needs to access Azure Key Vault secrets for database credentials. The app runs as a managed identity in Azure App Service. Which authentication method should be used to retrieve secrets without storing credentials in the app code?

A.Managed identity
B.Access key
C.Client certificate
D.Shared access signature (SAS) token
AnswerA

Managed identities for Azure resources provide an automatically managed identity in Azure Active Directory (Azure AD) for applications to use when connecting to resources that support Azure AD authentication. This eliminates the need for developers to manage credentials, as Azure handles the lifecycle of the identity. The web app can be granted specific permissions to Key Vault secrets directly via Azure AD role-based access control (RBAC), ensuring secure and credential-free access. This is the recommended and most secure approach for Azure-hosted applications.

Why this answer

Managed identity is the correct authentication method because it allows the Azure App Service web app to authenticate to Azure Key Vault without storing any credentials in code or configuration. Azure automatically manages the identity, and the app uses a token from the Azure Instance Metadata Service (IMDS) endpoint to access Key Vault secrets. This aligns with the principle of zero-trust and eliminates the security risk of hardcoded secrets.

Exam trap

The trap here is that candidates may confuse managed identity with other credential-based methods like access keys or client certificates, not realizing that managed identity is the only option that completely eliminates the need to store any credentials in the app code or configuration.

How to eliminate wrong answers

Option B is wrong because an access key is a static credential that must be stored in the app code or configuration, defeating the purpose of avoiding stored credentials. Option C is wrong because a client certificate requires the certificate to be stored in the app's code or file system, which introduces management overhead and potential exposure. Option D is wrong because a shared access signature (SAS) token is used for delegating access to Azure Storage resources, not for authenticating to Azure Key Vault, and it would still need to be stored in the app.

68
MCQmedium

You need to restrict access to an Azure Storage account so that only a specific subnet of a virtual network can access the data. Additionally, you need to allow management access from the Azure portal (e.g., to view containers). Which configuration should you apply?

A.Configure IP firewall rules to allow the subnet IP range and add the Azure portal's public IP addresses.
B.Configure a service endpoint for Microsoft.Storage on the subnet and add a firewall rule to allow the subnet, then enable 'Allow trusted Microsoft services'.
C.Configure a private endpoint for the storage account and disable public network access.
D.Configure IP ACLs to allow the subnet and also allow all Azure services.
AnswerB

Service endpoint provides secure connectivity from the subnet. The trusted Microsoft services exception allows portal management while keeping the firewall restricted.

Why this answer

Configuring a service endpoint for Microsoft.Storage on the subnet ensures traffic from that subnet to the storage account stays within the Azure backbone, and the firewall rule restricts access to that subnet. Enabling 'Allow trusted Microsoft services' permits Azure portal management operations (e.g., listing containers) because the portal is a trusted service that bypasses the network rules for control-plane actions.

Exam trap

The trap here is that candidates often confuse 'Allow trusted Microsoft services' with 'Allow all Azure services' or assume that IP-based rules for the Azure portal are static, when in fact the portal uses dynamic IP ranges that are not suitable for firewall rules.

How to eliminate wrong answers

Option A is wrong because Azure portal does not have a fixed set of public IP addresses; they can change, making this approach unreliable and not a supported pattern for management access. Option C is wrong because a private endpoint with public network access disabled would block all internet-based access, including the Azure portal, preventing management from the portal entirely. Option D is wrong because 'Allow all Azure services' is a legacy setting that broadly permits traffic from any Azure service, not just the specific subnet, violating the requirement to restrict access to only that subnet.

69
Multi-Selecthard

An Azure Functions document rendering job processes Service Bus messages. The function sometimes fails after partially completing work. Which two practices improve correctness?

Select 2 answers
A.Use dead-letter handling for repeatedly failing messages
B.Make the handler idempotent
C.Disable retries for all messages
D.Store connection strings in source code
AnswersA, B

Using dead-letter handling is a critical practice for robust message processing in Azure Functions. When a message repeatedly fails to process after a configured number of retries, perhaps due to malformed data or an unrecoverable external dependency issue, it should be moved to a dead-letter queue. This prevents "poison messages" from endlessly blocking the main queue and allows for subsequent manual inspection, debugging, or automated reprocessing logic without losing the message entirely.

Why this answer

Azure Functions can use dead-letter queues (DLQ) to isolate messages that repeatedly fail processing, preventing them from blocking the queue and allowing investigation without data loss. Option B is correct because making the handler idempotent ensures that if a message is retried after a partial failure (e.g., the function crashes mid-execution), reprocessing the same message does not cause duplicate or inconsistent state, which is critical for correctness in a Service Bus triggered function.

Exam trap

The trap here is that candidates may think disabling retries (Option C) prevents duplicate processing, but they overlook that retries are essential for transient fault tolerance, and the correct approach is to combine idempotency with dead-letter handling for permanent failures.

70
MCQhard

You are reviewing the ARM template for an App Service. What is the effect of the 'alwaysOn' property set to true?

A.The app will enable health checks at /health.
B.The app will scale out to multiple instances automatically.
C.The app will stay loaded in memory to avoid cold starts.
D.The app will be redeployed whenever the code changes.
AnswerC

When `alwaysOn` is enabled for an Azure App Service, the platform sends periodic internal requests to the application to ensure it remains active and loaded in memory. This crucial setting prevents the application from being idled out and unloaded, which is particularly beneficial for applications that experience infrequent traffic or require immediate responsiveness. By keeping the app loaded, it effectively eliminates "cold starts," where the application would otherwise incur significant latency while restarting and initializing resources upon the first request after a period of inactivity.

Why this answer

Setting 'alwaysOn' to true in an Azure App Service ARM template ensures that the app is kept loaded in memory even when there is no incoming traffic. This prevents the app from being unloaded after a period of inactivity, which eliminates cold starts on subsequent requests. Cold starts occur when the app process is recycled or unloaded, causing a delay as the runtime and application code are reloaded.

Exam trap

The trap here is that candidates may confuse 'alwaysOn' with health checks or scaling features, as the name suggests constant availability, but it specifically addresses process idle behavior, not load balancing or monitoring.

How to eliminate wrong answers

Option A is wrong because health checks are configured separately via the 'healthCheckPath' property in the site config, not by the 'alwaysOn' property. Option B is wrong because automatic scaling is controlled by autoscale rules or scaling settings, not by the 'alwaysOn' property which only affects the app's in-memory state. Option D is wrong because redeployment on code changes is handled by deployment slots, continuous deployment pipelines, or triggers like webhooks, not by the 'alwaysOn' property.

71
MCQhard

You are creating an Azure Container Instance using the Azure CLI command shown in the exhibit. The container needs to connect to a SQL database. After running the command, you notice that the DB_PASSWORD environment variable is visible in the container's logs. What is the most likely reason?

A.The --secure-environment-variables flag is misspelled.
B.The --secure-environment-variables flag is not supported for ACI.
C.The DB_PASSWORD value contains special characters that were not escaped.
D.The container image logs environment variables at startup, exposing the secure variable.
AnswerD

Although the `--secure-environment-variables` flag prevents the `DB_PASSWORD` from being visible in the Azure portal, Azure CLI output, or platform-generated logs, it does not prevent the application *running inside the container* from accessing and subsequently logging that variable. If the container's startup script or application code is configured to print all environment variables or specifically the `DB_PASSWORD` to `stdout` or `stderr`, this sensitive information will then appear in the container's application logs, effectively circumventing the platform's security measure. This scenario represents a common vulnerability where application-level logging exposes data that was securely injected.

Why this answer

The `--secure-environment-variables` flag in Azure CLI for Azure Container Instances does not prevent the values from being logged by the container itself. The flag only masks the values in the Azure portal and CLI output, but if the container image explicitly logs environment variables at startup (e.g., via a startup script or application code), the secure variable will be exposed in the container logs. The issue is not with Azure's handling but with the container image's behavior.

Exam trap

The trap here is that candidates assume `--secure-environment-variables` fully protects the variable from any exposure, but it only masks it in Azure's management plane, not from the container's own logging or process environment.

How to eliminate wrong answers

Option A is wrong because the correct flag is `--secure-environment-variables` (with a hyphen), and the exhibit shows it spelled correctly; a misspelling would cause a CLI parsing error, not silent exposure in logs. Option B is wrong because `--secure-environment-variables` is indeed supported for ACI (since API version 2018-10-01) and correctly masks values in Azure CLI output and portal. Option C is wrong because special characters in environment variable values require proper escaping in the shell command, but this would cause a syntax error or incorrect value assignment, not exposure in logs after successful deployment.

72
MCQmedium

Your organization runs a critical e-commerce application on Azure App Service. The application uses a Standard App Service plan with three instances. During a flash sale, traffic spikes cause some requests to fail with HTTP 503 errors. The operations team reports that the app's CPU usage reaches 95% during spikes. You need to ensure the application remains responsive without manual intervention. The solution must minimize cost while handling unpredictable traffic patterns. You evaluate the following options: A) Enable autoscale to scale out based on CPU usage threshold of 70%, with a maximum of 10 instances. B) Change the App Service plan to Premium v3 and enable zone redundancy. C) Implement a queue-based load leveling pattern using Azure Queue Storage and a background process. D) Use Azure Front Door with a Web Application Firewall (WAF) policy to distribute traffic. Which option should you recommend?

A.Use Azure Front Door with a Web Application Firewall (WAF) policy to distribute traffic.
B.Enable autoscale to scale out based on CPU usage threshold of 70%, with a maximum of 10 instances.
C.Implement a queue-based load leveling pattern using Azure Queue Storage and a background process.
D.Change the App Service plan to Premium v3 and enable zone redundancy.
AnswerB

Enabling autoscale directly addresses the need for dynamic compute capacity by automatically adding or removing instances based on defined metrics. Setting a CPU usage threshold of 70% ensures that new instances are provisioned proactively when demand increases, while the maximum of 10 instances prevents unbounded scaling. This approach effectively handles traffic spikes by scaling out horizontally, optimizing both performance and cost efficiency.

Why this answer

Enabling autoscale on the Standard App Service plan allows the application to automatically scale out from 3 to up to 10 instances when CPU exceeds 70%, handling traffic spikes without manual intervention. This minimizes cost by only adding instances when needed, and the Standard plan supports autoscale natively, making it the most cost-effective solution for unpredictable traffic patterns.

Exam trap

The trap here is that candidates often confuse traffic distribution solutions (like Azure Front Door) with scaling solutions, or assume that upgrading the plan is necessary for high availability, when autoscale on the existing Standard plan is the most cost-effective and direct fix for CPU-driven 503 errors.

How to eliminate wrong answers

Option A is wrong because Azure Front Door with WAF is a global load balancer and security layer that distributes traffic across endpoints but does not scale the underlying App Service instances; it would not resolve CPU saturation causing 503 errors. Option C is wrong because a queue-based load leveling pattern decouples request processing but introduces latency and complexity for a synchronous e-commerce application where users expect immediate responses, and it does not directly address CPU spikes on the web tier. Option D is wrong because changing to Premium v3 and enabling zone redundancy improves availability and performance but significantly increases cost and does not provide dynamic scaling based on CPU usage; it is overprovisioning for unpredictable spikes.

73
MCQmedium

You have an order processing system using Azure Service Bus. Each order generates multiple messages that must be processed in order and by the same consumer. Which Service Bus feature ensures this?

A.Message sessions
B.Topics and subscriptions
C.Dead-letter queues
D.Auto-forwarding
AnswerA

Message sessions are the correct mechanism for guaranteeing ordered, first-in-first-out (FIFO) delivery of related messages and ensuring that all messages belonging to a specific session are processed by a single consumer. By assigning a unique SessionId to a group of messages, Azure Service Bus ensures that these messages are delivered sequentially and processed exclusively by one receiver, which is crucial for maintaining the logical order in an order processing system.

Why this answer

Message sessions in Azure Service Bus enable ordered, sequential processing of related messages by a single consumer. When messages belong to the same session, they are guaranteed to be delivered in order and are locked to a single consumer until the session is complete, ensuring that all messages for a given order are processed by the same consumer without interleaving.

Exam trap

The trap here is that candidates often confuse topics/subscriptions (which handle fan-out messaging) with the need for ordered, single-consumer processing, not realizing that only sessions provide the required ordering and consumer affinity.

How to eliminate wrong answers

Option B is wrong because topics and subscriptions implement a publish/subscribe pattern, which broadcasts messages to multiple subscribers and does not guarantee ordered delivery or single-consumer processing. Option C is wrong because dead-letter queues are used to hold messages that cannot be processed normally (e.g., due to exceeding max delivery count), not to enforce ordering or consumer affinity. Option D is wrong because auto-forwarding moves messages from one queue or subscription to another automatically, but it does not provide session-based ordering or ensure the same consumer processes all related messages.

74
Multi-Selecthard

A Blob Storage workflow for product images must prevent accidental overwrite and support recovery of prior versions. Which two features should be enabled?

Select 2 answers
A.SFTP support
B.Blob soft delete
C.Static website hosting
D.Blob versioning
AnswersB, D

Blob soft delete provides a critical data protection mechanism by allowing the recovery of blobs, snapshots, or versions that have been accidentally deleted or overwritten. When enabled, deleted data remains recoverable for a specified retention period, preventing permanent loss. This feature ensures that even if a product image is mistakenly removed, it can be restored to its state at the time of deletion, significantly mitigating data loss risks and aiding compliance.

Why this answer

Blob soft delete (B) protects against accidental deletion or overwrite by retaining deleted blobs for a configurable retention period, allowing recovery. Blob versioning (D) automatically maintains prior versions of a blob, enabling restoration of any previous state. Together, they provide comprehensive protection against overwrites and support version recovery.

Exam trap

The trap here is that candidates may confuse SFTP support or static website hosting with data protection features, but neither provides versioning or soft-delete capabilities required for overwrite prevention and recovery.

75
MCQeasy

Avanade is developing a .NET Core console application that runs on an Azure VM. The application needs to read a secret from Azure Key Vault. The VM has a system-assigned managed identity enabled. The managed identity has been granted 'Get' and 'List' permissions on the Key Vault secrets. The code uses the Azure.Identity and Azure.Security.KeyVault.Secrets NuGet packages. Which code snippet should the developer use to authenticate to Key Vault?

A.var client = new SecretClient(new Uri(keyVaultUrl), new EnvironmentCredential());
B.var client = new SecretClient(new Uri(keyVaultUrl), new DefaultAzureCredential());
C.var client = new SecretClient(new Uri(keyVaultUrl), new ManagedIdentityCredential());
D.var client = new SecretClient(new Uri(keyVaultUrl), new ClientSecretCredential(tenantId, clientId, clientSecret));
AnswerB

DefaultAzureCredential is the most robust and recommended choice for applications deployed to Azure. It intelligently attempts to authenticate using a chain of methods, including managed identity, Azure CLI, environment variables, and Visual Studio. When running on an Azure resource with a system-assigned managed identity enabled, it automatically detects and utilizes that identity, eliminating the need for explicit credential management in the application code. This adaptability makes it ideal for production environments.

Why this answer

DefaultAzureCredential attempts multiple authentication sources in order, including EnvironmentCredential, ManagedIdentityCredential, and others. Since the VM has a system-assigned managed identity enabled and the code runs in that environment, DefaultAzureCredential will automatically fall through to ManagedIdentityCredential and authenticate using the managed identity's token endpoint. This provides the most flexible and recommended approach for Azure SDK authentication.

Exam trap

The trap here is that candidates often pick ManagedIdentityCredential (Option C) thinking it is the most direct choice, but Azure recommends DefaultAzureCredential for production code because it provides automatic fallback and works across local development and Azure environments without code changes.

How to eliminate wrong answers

Option A is wrong because EnvironmentCredential only reads credentials from environment variables (AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET) and does not attempt managed identity authentication, so it would fail on a VM without those variables set. Option C is wrong because while ManagedIdentityCredential would work in this specific scenario, it is less flexible than DefaultAzureCredential and would not fall back to other credential sources if the managed identity is unavailable or misconfigured; the question asks for the best practice snippet. Option D is wrong because ClientSecretCredential requires explicit tenant ID, client ID, and client secret, which are not available or appropriate when using a system-assigned managed identity.

Page 1 of 12

Page 2