Courseiva

AI-102 Implement an agentic solution Practice Question

You are deploying an agentic solution using Azure AI Agent Service. The agent needs to be invoked from a custom application using REST API calls. Which endpoint should you use to send a message to the agent?

⚠ Common exam trap

Many candidates confuse the endpoint for sending a message with the endpoint for starting a run, mistakenly thinking that POST /threads/{thread_id}/runs both sends the message and invokes the agent, when in fact messages must be added separately before a run.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

POST /threads/{thread_id}/messages

To send a message to an existing conversation thread in Azure AI Agent Service, you must use the POST /threads/{thread_id}/messages endpoint. This adds the user's message to the specified thread, which the agent can then process in a subsequent run. The REST API requires the thread to already exist, and messages are posted directly to that thread's resource.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    POST /threads/{thread_id}/runs

    Why it's wrong here

    POST /threads/{thread_id}/runs starts an agent run on an existing thread, but the message itself must first be added via POST /threads/{thread_id}/messages; a run alone sends no content. It is tempting because runs are what execute the agent, making this the correct call once a message already exists on the thread.

  • ✗

    POST /threads

    Why it's wrong here

    POST /threads creates a conversation container and returns a thread ID, but a message is only processed once a run is created against that thread. It is tempting because threads hold the message history, so creating one is a genuine prerequisite step before the agent can be invoked.

  • ✓

    POST /threads/{thread_id}/messages

    Why this is correct

    Messages are added to an existing conversation thread, so POST /threads/{thread_id}/messages is the correct REST operation for sending user input to the agent. Thread creation happens first; the run is then started separately to process that message.

  • ✗

    GET /agents

    Why it's wrong here

    GET /agents lists or retrieves agent definitions; it carries no message payload and cannot trigger a run, so no message reaches the agent. It is tempting because agent discovery and configuration retrieval genuinely use GET on the agents resource, which is correct when enumerating available agents rather than conversing with one.

About these practice questions

Courseiva writes every AI-102 question from scratch — 761 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.