Microsoft AI-200 Practice Exam
Microsoft Azure AI Cloud Developer AI-200
The Microsoft AI-200 exam, Developing AI Cloud Solutions on Azure, earns the Azure AI Cloud Developer Associate certification and follows the retired AZ-204. It validates the skills to build the back end of AI solutions on Azure. It is weighted across four domains: develop containerized solutions at 20 to 25 percent, develop AI solutions with Azure data management services at 25 to 30 percent, connect to and consume Azure services at 20 to 25 percent, and secure, monitor and troubleshoot solutions at 20 to 25 percent. This practice exam mirrors that scope with single-answer and multiple-answer questions and drag-and-drop items, each with a worked explanation.
Question bank updated : questions, answers, explanations and chapters.
Certification Overview
- Exam name: AI-200
- Vendor: Microsoft
- Exam code: AI-200
- Duration: 100 minutes
- Total questions: about 50
- Official passing score: 700 on a scale of 1 to 1,000 (source)
- Our practice exam pass mark: 70%
Who Should Take This Exam?
Cloud Developer, Back-end Developer, AI Developer, Python Developer, Software Engineer, Data Engineer, Solutions Developer, DevOps Engineer moving into AI
Prerequisites
No formal prerequisite. Microsoft expects Python programming, Azure and third-party SDKs, Azure data, messaging and monitoring services, vector databases and containerized applications.
Topics Covered
- Develop containerized solutions on Azure
- Develop AI solutions by using Azure data management services
- Connect to and consume Azure services
- Secure, monitor, and troubleshoot Azure solutions
Question Types
- Multiple Choice (Single Answer)
- Multiple Choice (Multiple Answers)
- Drag and Drop
AI-200 Practice Questions
Our question bank contains 650+ practice questions for this certification. Sample questions from each exam chapter. Expand a question to see the answer choices. With a subscription, you get unlimited practice exams with randomised questions from our full question bank.
Develop containerized solutions on Azure
A developer's laptop has no Docker Engine installed. Which command builds the image from the Dockerfile in the current folder inside registry myreg and pushes the result there?
- A. az acr repository update --name myreg --image app:v1 --write-enabled true
- B. az acr import --name myreg --source docker.io/library/app:v1 --image app:v1
- C. az acr build --registry myreg --image app:v1 --file Dockerfile . Correct answer
- D. az acr task run --registry myreg --name app-build
Option C is correct because az acr build sends the build context and Dockerfile to ACR Tasks, which builds the image in the cloud and pushes it to the registry, so no local Docker Engine is needed. Option A only changes attributes of an existing tag, option B imports an already-built image from another registry without building, and option D runs a pre-defined task named app-build rather than building from the current folder.
A Python API image runs on Azure App Service for Containers (Linux). The container listens on port 8000, and the platform log reports that the container did not respond to the HTTP ping. Which app setting tells App Service which port to send requests to?
- A. WEBSITES_PORT=8000 Correct answer
- B. WEBSITES_ENABLE_APP_SERVICE_STORAGE=true
- C. SCM_DO_BUILD_DURING_DEPLOYMENT=true
- D. WEBSITES_CONTAINER_START_TIME_LIMIT=600
Option A is correct because the WEBSITES_PORT app setting tells App Service for Containers which port the container listens on, so the HTTP ping goes to 8000 instead of the default probing. Option B controls persistent shared storage, option C controls Oryx build during code deployment, and option D only extends the start-up wait time without changing the port.
A custom Linux container in App Service must pull its image from the private registry myreg. Company policy forbids storing registry credentials in app settings. Which configuration satisfies the policy?
- A. Enable a system-assigned identity, assign it Reader on myreg, and set acrUseManagedIdentityCreds to true
- B. Enable a system-assigned identity, assign it AcrPull on myreg, and set acrUseManagedIdentityCreds to true Correct answer
- C. Enable a system-assigned identity, assign it AcrPull on the App Service plan, and set acrUseManagedIdentityCreds to true
- D. Create a service principal with AcrPull on myreg and store its secret in the DOCKER_REGISTRY_SERVER_PASSWORD app setting
Option B is correct because a managed identity with the AcrPull role on the registry lets App Service pull images without any stored credentials, and acrUseManagedIdentityCreds makes the platform use that identity. Option A grants only Reader, which does not allow image pulls. Option C scopes the role to the App Service plan instead of the registry. Option D stores a secret in an app setting, which the policy forbids.
Application images in registry myreg are built FROM a company base image that a platform team also pushes to myreg. Developers want each application image rebuilt automatically whenever a new base image version is pushed. What should they configure?
- A. A quick task that runs az acr build for each application image from the pipeline that publishes the base image
- B. An ACR task with a timer trigger that runs az acr build for every application image each night
- C. A registry webhook on the base image repository that restarts the web apps running the application images
- D. An ACR task per application image with a Git source context, leaving the base image update trigger enabled Correct answer
Option D is correct because an ACR task with a Git source context tracks the base image referenced in its FROM line, and with the base image update trigger enabled it rebuilds the application image automatically when that base image is pushed. Option A and option B rely on a pipeline or a schedule rather than detecting the base image change, and option C only restarts web apps, which does not rebuild any image.
A team is deciding where to host a queue-driven embedding worker: Azure Container Apps or Azure App Service for Containers. Which TWO capabilities does only Container Apps provide? (Choose two.)
- A. Pulling images from Azure Container Registry with a managed identity
- B. Deployment slots that swap staging into production
- C. Replicas that scale to zero when a Service Bus queue is empty Correct answer
- D. Autoscale rules driven by App Service plan CPU percentage
- E. A Dapr sidecar enabled with a setting on the app Correct answer
Options C and E are correct because only Azure Container Apps can scale replicas to zero from a KEDA Service Bus rule and expose Dapr as a built-in sidecar setting. App Service for Containers has deployment slots (B) and plan-based autoscale (D), always keeps at least one instance, and both platforms can pull from ACR with a managed identity (A), so A, B and D are not exclusive to Container Apps.
Develop AI solutions by using Azure data management services
A Python service on Azure Container Apps connects to Azure Cosmos DB for NoSQL with the azure-cosmos package. Local authentication (account keys) is disabled on the account, and the app uses a managed identity. How should the client be set up?
- A. Pass the account's read-write key from Key Vault to CosmosClient at startup
- B. Pass DefaultAzureCredential to CosmosClient and assign the identity the Contributor role on the account
- C. Pass a connection string that holds the read-only key from an environment variable
- D. Pass DefaultAzureCredential to CosmosClient and assign the identity a Cosmos DB data-plane role Correct answer
Option D is correct because with local authentication disabled, Microsoft Entra ID is the only way in, and the Cosmos DB data plane is authorized through its own RBAC roles (such as Cosmos DB Built-in Data Contributor) assigned to the managed identity, with DefaultAzureCredential supplying the token. Options A and C rely on account keys, which are disabled, and option B fails because the Azure Contributor role is a control-plane role that grants no data-plane access.
A container stores product documents with a 1536-dimension vector at /embedding and a diskANN vector index on that path. Insert RU charges are high. Which indexing policy change lowers write cost while vector search keeps working?
- A. Change distanceFunction in the container vector policy from cosine to dotproduct
- B. Set indexingMode to none and keep querying with VectorDistance
- C. Add /embedding/* to excludedPaths and keep the vectorIndexes entry for /embedding Correct answer
- D. Remove the vectorIndexes entry and keep /embedding in includedPaths
Option C is correct because Cosmos DB requires the vector path to be excluded from the regular indexing policy; the vectorIndexes entry alone builds the vector index, so excluding /embedding/* stops the 1536-dimension array from also being indexed as ordinary scalar values and cuts insert RUs. Option A only changes the similarity metric, option B turns indexing off so queries break, and option D removes the vector index that VectorDistance relies on.
A RAG back end reads documents from a single-region Azure Cosmos DB for NoSQL account set to Strong consistency. Read RU charges are high. Each user must see their own latest writes, but seeing other users' writes immediately is not required. Which change lowers the RU cost of reads?
- A. Set the default consistency level to Session Correct answer
- B. Keep Strong consistency and raise the autoscale maximum throughput
- C. Set the default consistency level to Eventual
- D. Set the default consistency level to Bounded staleness with a small lag window
Option A is correct because Session consistency guarantees read-your-own-writes within a session and costs fewer RUs per read than Strong, since Strong needs a quorum read across replicas. Option B only raises the throughput ceiling without lowering the cost of each read, option C (Eventual) does not guarantee that a user sees their own latest writes, and option D (Bounded staleness) has a quorum-style read cost similar to Strong.
A .NET service uses the change feed processor to push item changes into a search index. Which component stores the processing progress for each range of partition key values?
- A. The Azure Storage account linked to the Cosmos DB account
- B. The _lsn property of the monitored container
- C. A checkpoint file on the compute instance
- D. The lease container Correct answer
Option D is correct because the change feed processor keeps its state, including the continuation token for each range of partition key values and lease ownership, as items in a lease container. The Storage account, the _lsn property and a local file are not used for processor checkpoints, and a local file would also be lost when the instance changes.
An Azure Cosmos DB for NoSQL account has Session as its default consistency level. Which two levels can a client request for an individual operation because each is weaker than Session? (Choose two.)
- A. Eventual Correct answer
- B. Consistent prefix Correct answer
- C. Read committed
- D. Bounded staleness
- E. Strong
Options A and B are correct because a client can only relax consistency below the account default, and Session is stronger than Consistent prefix and Eventual. Strong and Bounded staleness are stronger than Session so a request cannot ask for them, and Read committed is not a Cosmos DB consistency level.
Connect to and consume Azure services
Which Azure Service Bus entity lets each of several downstream services receive its own copy of every message a producer sends?
- A. A topic with one subscription per service Correct answer
- B. A queue read by competing receivers
- C. A queue with sessions enabled
- D. A queue with auto-delete on idle
Option A is correct because a Service Bus topic with one subscription per downstream service delivers an independent copy of every message to each subscription (publish/subscribe). A queue, with or without competing receivers, sessions or auto-delete on idle, delivers each message to only one receiver, so options B, C and D do not fan out copies.
A support tool written in Python must list the messages Service Bus moved to the dead-letter queue of the queue ingest-jobs, together with the reason each was dead-lettered. Which approach with the azure-servicebus package does this?
- A. Peek ingest-jobs and keep messages with a high delivery_count
- B. Read the queue's runtime properties for each dead-lettered reason
- C. Receive from a queue named ingest-jobs-dlq and read dead_letter_reason
- D. Open a receiver with sub_queue=DEAD_LETTER and read dead_letter_reason Correct answer
Option D is correct because the azure-servicebus receiver is opened with sub_queue=ServiceBusSubQueue.DEAD_LETTER, which reads the dead-letter sub-queue and exposes dead_letter_reason on each message. Option C is wrong because the Python SDK does not take a queue name like ingest-jobs-dlq (the $DeadLetterQueue path is reached through sub_queue). Option A only peeks the active queue, and option B's runtime properties give counts, not per-message reasons.
A topic named docs feeds a subscription named pdf-ocr. A developer adds a correlation filter rule that matches the application property contentType = application/pdf, yet the subscription still receives every message published to the topic. What explains this?
- A. Correlation filters inspect the message body, not application properties
- B. A correlation filter also needs a SQL action before it takes effect
- C. The default match-all rule is still on the subscription Correct answer
- D. Filter rules must be defined on the topic, not on its subscriptions
Option C is correct because a new subscription is created with a default match-all rule ($Default) that accepts every message, and a message is delivered if any rule matches. Until that default rule is deleted, the correlation rule has no narrowing effect. Correlation filters do match application properties (A is wrong), need no action (B), and are defined on subscriptions, not the topic (D).
Several worker instances read one Service Bus queue that receives chunked document updates. Updates for the same document must be handled in order by one worker at a time, while different documents are processed in parallel. What should the team configure?
- A. Enable sessions on the queue and set the session ID to the document ID Correct answer
- B. Set MaxConcurrentCalls to 1 on every worker instance
- C. Enable partitioning and set the partition key to the document ID
- D. Create a topic with one subscription per worker and filter on document ID
Option A is correct because Service Bus sessions guarantee FIFO ordering within a session ID and let only one receiver hold a session lock at a time, while different sessions are handled in parallel by different workers. Limiting MaxConcurrentCalls to 1 (B) removes parallelism across documents and does not tie a document to one worker, partitioning (C) does not give ordered, exclusive handling per key, and a topic per worker (D) would duplicate messages.
An order service sends each order to a Standard-tier Service Bus queue that has duplicate detection enabled with the default history window. The service stamps every send attempt with a freshly generated GUID as the MessageId and can retry a failed send for up to 45 minutes. Duplicate orders still reach consumers. Which TWO changes stop the duplicates? (Choose two.)
- A. Set each order message's time to live to 45 minutes
- B. Enable partitioning on the queue
- C. Set session_id to the order number so retries share one session
- D. Set message_id to the order number on every attempt Correct answer
- E. Set the duplicate detection history window to 1 hour Correct answer
Options D and E are correct because duplicate detection compares only MessageId, so a new GUID on every attempt defeats it; using the order number as message_id makes each retry a recognisable duplicate. The default history window is 10 minutes, shorter than the 45-minute retry period, so it must be raised to at least 45 minutes (1 hour works). Time to live, partitioning and sessions do not change which messages are treated as duplicates.
Secure, monitor, and troubleshoot Azure solutions
A rotation function must create a fresh database password version shortly before the current one expires. Which Key Vault event, delivered through Event Grid, should trigger it?
- A. Microsoft.KeyVault.SecretExpired
- B. Microsoft.KeyVault.CertificateNearExpiry
- C. Microsoft.KeyVault.SecretNewVersionCreated
- D. Microsoft.KeyVault.SecretNearExpiry Correct answer
Option D is correct because Key Vault publishes Microsoft.KeyVault.SecretNearExpiry through Event Grid ahead of the expiration date, which is the signal a rotation function needs to create a new version before the old one lapses. SecretExpired (A) fires only after expiry, CertificateNearExpiry (B) concerns certificates, and SecretNewVersionCreated (C) fires after a rotation has already happened.
A container app's user-assigned managed identity calls SecretClient.get_secret and receives 403 Forbidden. The vault uses the Azure RBAC permission model, and the identity holds only Key Vault Reader on it. Which change lets the app read secret values?
- A. Assign Key Vault Contributor on the vault
- B. Add an access policy that grants Get on secrets
- C. Assign Key Vault Secrets User on the vault Correct answer
- D. Assign Key Vault Crypto User on the vault
Option C is correct because with the Azure RBAC permission model, reading secret values requires a data-plane role such as Key Vault Secrets User. Key Vault Reader and Key Vault Contributor only manage or view vault metadata, not secret contents, access policies (B) are ignored under RBAC, and Key Vault Crypto User (D) covers key operations, not secrets.
Settings for an AI back end are loaded through the App Configuration provider, and one key must resolve to a Cosmos DB connection string that is kept as a Key Vault secret. How should that key be created in the store?
- A. Copy the secret value into a key-value and encrypt the store with a customer-managed key
- B. Create a Key Vault reference that points to the secret URI Correct answer
- C. Create a key-value labeled with the vault name and the secret name
- D. Create a feature flag whose filter holds the secret URI
Option B is correct because App Configuration supports Key Vault references, which store only the secret URI; the provider resolves the reference against Key Vault at load time using the app's identity. Copying the secret into the store (A) defeats the purpose of keeping it in the vault, and labels (C) or feature flag filters (D) do not resolve secrets.
A Python service on Azure Container Apps must read secrets from a key vault that uses the Azure RBAC permission model, and no credential may be stored with the app. Which two actions are required? (Choose two.)
- A. Enable a managed identity on the container app Correct answer
- B. Assign the Key Vault Secrets User role to the identity on the key vault Correct answer
- C. Assign the Reader role to the identity on the key vault
- D. Assign the Contributor role to the identity on the resource group
- E. Add an access policy that grants the identity the Get secret permission
Options A and B are correct because a managed identity removes any stored credential, and on a vault using the Azure RBAC permission model the Key Vault Secrets User role gives that identity read access to secret values. Option C (Reader) only reads metadata, not secret values. Option D (Contributor on the resource group) manages resources but gives no data-plane access to secrets. Option E is an access-policy step, which is ignored when the vault uses the RBAC permission model.
A payments API reads a database password from the Key Vault secret db-pass. Policy requires a new password every 60 days, applied to the database and published as a new secret version by an Azure Function that runs under its own managed identity, with no manual step. Which two actions meet the policy? (Choose two.)
- A. Set the activation date on db-pass 60 days ahead to make Key Vault create the next version
- B. Assign the function's identity the Key Vault Secrets Officer role on the vault Correct answer
- C. Set an expiry on each secret version and subscribe the function to SecretNearExpiry Correct answer
- D. Define a rotation policy on db-pass with a 60-day trigger
- E. Assign the function's identity the Key Vault Secrets User role on the vault
Options B and C are correct because Key Vault does not rotate secrets by itself: it raises a SecretNearExpiry event before a version expires, and the subscribed function generates the new password, updates the database and writes a new version. Writing the version requires set permission, which the Key Vault Secrets Officer role provides. Option A is wrong because an activation date only controls when a version becomes usable and never creates versions. Option D is wrong because automatic rotation policies exist for keys and certificates, not secrets. Option E is wrong because Secrets User is read-only, so the function could not publish a new version.
Free Study Guide
Read the free Microsoft AI-200 study guide: every exam topic explained in plain English, with diagrams, exam tips and the mistakes to avoid.
More Microsoft Practice Exams
- Microsoft AI-103 Practice Exam
- Microsoft AI-901 Practice Exam
- Microsoft AZ-104 Practice Exam
- Microsoft AZ-305 Practice Exam
- Microsoft AZ-400 Practice Exam
- Microsoft AZ-900 Practice Exam
- Microsoft DP-600 Practice Exam
- Microsoft DP-700 Practice Exam
- Microsoft DP-900 Practice Exam
- Microsoft MD-102 Practice Exam
- Microsoft PL-300 Practice Exam
- Microsoft SC-100 Practice Exam
Practise with realistic mock exams to prepare for your Microsoft certification.