microsoft AI-200: Developing AI Cloud Solutions on Azure · Practice questions

3. Connect to and consume Azure services Practice Questions

Review 10 sample questions with their correct answers and explanations. Sign up free to continue with the full topic quiz.

Sign up free for the full quiz

Question 1

A function app reads a secret from Key Vault through an app setting reference. The app must keep running if the secret changes, without redeploying. What is true?

  1. References only work for connection strings
  2. The function must call Key Vault on every invocation
  3. References without a version pick up the latest version, refreshed periodically or on restart — Correct
  4. The function app must be redeployed for each new secret version, because references are resolved at build time

Correct answer

References without a version pick up the latest version, refreshed periodically or on restart

Explanation

Versionless Key Vault references resolve to the latest version, refreshed periodically and after a restart.

Question 2

Processing a long AI document job takes 4 minutes, but the queue lock duration is 1 minute. Messages are processed twice. What should you do?

  1. Lower MaxDeliveryCount to 1
  2. Renew the message lock while processing continues — Correct
  3. Increase the message time to live to 10 minutes so the lock stays valid during processing
  4. Switch to ReceiveAndDelete and accept losses

Correct answer

Renew the message lock while processing continues

Explanation

Lock renewal keeps the message locked while processing continues, preventing redelivery.

Question 3

A serverless API needs VNet integration, scale to zero, fast scaling and per-function concurrency control. Which hosting plan is recommended?

  1. Container Instances
  2. Legacy Consumption on Windows
  3. A Free App Service plan
  4. Flex Consumption — Correct

Correct answer

Flex Consumption

Explanation

The Flex Consumption plan offers serverless billing with VNet integration, always-ready instances and faster scaling.

Question 4

Which statement best distinguishes Azure Event Grid from Azure Service Bus?

  1. Service Bus routes events to many handlers by default, while Event Grid only supports one consumer per topic
  2. Event Grid guarantees FIFO ordering
  3. Event Grid pushes event notifications; Service Bus offers durable queued messaging with sessions and dead-lettering — Correct
  4. They are the same service with different pricing

Correct answer

Event Grid pushes event notifications; Service Bus offers durable queued messaging with sessions and dead-lettering

Explanation

Event Grid is reactive event routing. Service Bus is enterprise messaging with ordering, transactions and durable queues.

Question 5

A workflow fans out to 200 parallel document summarizations, then aggregates the results, with automatic checkpointing. What should you use?

  1. Durable Functions with the fan-out/fan-in pattern — Correct
  2. Event Grid only
  3. A timer trigger every second
  4. A single HTTP-triggered function with a long timeout that loops through the documents

Correct answer

Durable Functions with the fan-out/fan-in pattern

Explanation

Durable Functions orchestrations handle fan-out/fan-in with state checkpointing.

Question 6

An event-driven pipeline must keep working if a downstream API is down for an hour, without losing requests. Which design fits best?

  1. Use Event Grid with a 1-minute retry TTL
  2. Call the API directly from the HTTP trigger and retry in a loop until it responds
  3. Store requests in memory
  4. Queue the requests in Service Bus and process them with retries and a dead-letter queue — Correct

Correct answer

Queue the requests in Service Bus and process them with retries and a dead-letter queue

Explanation

Durable queues buffer work during outages, and retries plus dead-lettering prevent data loss.

Question 7

An Event Grid webhook endpoint is temporarily down. What does Event Grid do by default?

  1. It drops the event immediately
  2. It retries every second forever
  3. It sends the event to a Service Bus dead-letter queue automatically
  4. It retries with exponential backoff, up to 30 attempts or 24 hours — Correct

Correct answer

It retries with exponential backoff, up to 30 attempts or 24 hours

Explanation

Event Grid retries with an exponential backoff schedule up to the default limits of 30 attempts and 1,440 minutes.

Question 8

Two functions in the same app must scale independently because one handles HTTP and one handles heavy queue processing. What should you consider?

  1. Put them in separate function apps, because scaling is usually per app — Correct
  2. Using a single host.json setting
  3. Use two triggers on one function so the scale controller can track each trigger separately
  4. Using Durable entities

Correct answer

Put them in separate function apps, because scaling is usually per app

Explanation

Scaling is typically per app. Separate apps isolate scaling and failures. Flex Consumption also offers per-function scaling for some triggers.

Question 9

A sender may retry after a network timeout and accidentally send the same message twice. The queue must discard the duplicate. What should you configure?

  1. Message sessions, with a new SessionId generated by the sender for each retry attempt
  2. Duplicate detection on the queue and a stable MessageId set by the sender — Correct
  3. Auto-forwarding
  4. A shorter lock duration

Correct answer

Duplicate detection on the queue and a stable MessageId set by the sender

Explanation

Duplicate detection drops messages with a MessageId already seen within the detection window.

Question 10

An HTTP function returns the result of a Cosmos DB lookup for an id in the route. Which binding avoids writing lookup code?

  1. A queue trigger
  2. A Cosmos DB trigger on the container, filtered by the id in the route
  3. A Cosmos DB input binding that uses the route parameter as the id and partition key — Correct
  4. A Blob output binding

Correct answer

A Cosmos DB input binding that uses the route parameter as the id and partition key

Explanation

Input bindings read data based on trigger values, such as route parameters.

Ready for the full quiz?

Create a free QuizAnalyst account to practice the complete question set and save your progress.

Sign up free for the full quiz