Domain 2 β€” Module 4 of 12 33%
14 of 28 overall
Domain 2: Integrate and Extend Agents in Copilot Studio Free ⏱ ~14 min read

Adding Tools: Custom Connectors and REST APIs

Custom connectors and REST API tools for agent integration.

Giving your agent hands β€” not just a brain

Simple explanation

Knowledge sources let your agent answer questions. Tools let your agent do things.

In the previous modules, you connected knowledge β€” the agent can search documents and look up data. But what about when the agent needs to create a shipping label, check a delivery status, or trigger a background check? That is where tools come in.

Copilot Studio gives you two ways to add tools that call external systems: custom connectors (you build a reusable connector from an OpenAPI spec) and REST API tools (you point the agent directly at an API endpoint). Both let the agent call external services β€” but they work differently and serve different purposes.

The critical three-way comparison

This table resolves the most confusing distinction in the exam. Topic HTTP requests, REST API tools, and custom connectors all call external APIs β€” but they are fundamentally different mechanisms.

Topic HTTP (M10) vs REST API tool vs custom connector β€” the exam's favourite comparison
FeatureHow it is triggeredScopeReusabilityAuth configurationWhen to use
Topic HTTP request (M10)Runs inside a topic node β€” you explicitly place it in the flowSingle topic only β€” fires when that topic's flow reaches the HTTP nodeNot reusable β€” copy/paste to use in another topicInline in the HTTP node (headers, query params)One-off API calls within a specific conversation flow you control
REST API toolAgent autonomously decides to call it based on the user's intentGlobal (available to orchestrator across all topics) or agent-scopedReusable within the agent but not across agents without reconfigurationConfigured at the tool level (API key, OAuth, or none)When the agent should autonomously decide to call an API based on conversation context
Custom connectorAgent autonomously invokes connector actions as toolsShared across the Power Platform environment β€” usable by multiple agents and appsHighly reusable β€” published to the connector galleryConfigured at the connector level with connection-level authWhen multiple agents or apps need the same API integration β€” build once, use everywhere
Exam trap: 'the agent calls an API' is not enough information

If an exam question says β€œthe agent calls an external API,” that alone does not tell you which mechanism is used. You need to know: Does the developer control when it fires (topic HTTP)? Does the orchestrator choose autonomously (REST API tool or custom connector)? Is it shared across agents (custom connector)? Read the scenario carefully for these clues.

Custom connectors: build once, use everywhere

A custom connector wraps an external API as a reusable Power Platform connector. Here is the workflow:

  1. Get the API’s OpenAPI spec (Swagger JSON/YAML). If the API does not have one, you can build the definition manually in the custom connector editor.
  2. Create the custom connector in the Power Platform maker portal β€” import the OpenAPI spec, configure the base URL, and define actions (each action maps to an API endpoint).
  3. Configure authentication β€” supported types: API key, OAuth 2.0 (authorization code or client credentials), Windows authentication, or no auth.
  4. Test the connector in the maker portal β€” verify each action returns expected data.
  5. Add to the agent β€” in Copilot Studio, add the custom connector as a tool. Select which actions to expose to the agent.
  6. Configure descriptions β€” the orchestrator uses the action descriptions to decide when to invoke the tool. Clear, specific descriptions are critical for correct autonomous invocation.
Why descriptions matter so much

When you add a custom connector as a tool, the agent’s orchestrator reads the action description to decide whether to call it. A vague description like β€œGets data” will confuse the orchestrator. A precise description like β€œRetrieves the current delivery status for a shipment by tracking number” tells the orchestrator exactly when to use the tool. Poor descriptions are the number one cause of tools not firing or firing at the wrong time.

REST API tools: direct and fast

REST API tools skip the connector layer entirely. You configure the API call directly in Copilot Studio.

Configuration steps:

  1. In Copilot Studio, navigate to Tools and add a new REST API tool.
  2. Define the endpoint β€” URL, HTTP method (GET, POST, PUT, DELETE), headers, query parameters, and request body schema.
  3. Define the response schema β€” tell the agent what shape the JSON response will have so it can extract values.
  4. Configure authentication β€” API key (header or query param), OAuth 2.0, or managed identity.
  5. Set the scope β€” global (orchestrator can use it anytime) or restricted to specific topics.
  6. Write a clear description β€” same as custom connectors, the orchestrator uses this to decide when to call the API.

Global vs topic-scoped REST API tools:

ScopeBehaviourUse when
GlobalAvailable to the orchestrator across all conversations. The agent autonomously decides when to call it.The API is broadly useful β€” weather, exchange rates, shipping status
Topic-scopedOnly available within specific topics. The orchestrator only considers it during those topics.The API is relevant only in specific conversation flows
Scenario: Dev creates a delivery tracking connector

Dev is the Power Platform developer at a logistics company. The internal shipping system exposes a REST API for tracking deliveries. Dev needs the customer service agent to look up delivery status automatically when customers ask β€œWhere is my package?”

Dev has a choice: custom connector or REST API tool?

The shipping API is used by four different agents (customer service, warehouse ops, returns, and partner portal). Dev chooses a custom connector β€” build once, use in all four agents. He imports the OpenAPI spec from the shipping team, configures OAuth 2.0 client credentials (the agent authenticates as a service account), and publishes the connector. Then he adds it to the customer service agent with the description: β€œRetrieves real-time delivery status, estimated arrival date, and carrier details for a shipment by tracking number.”

A customer asks: β€œWhere is order #SH-2024-55891?” The orchestrator reads the tool description, matches the intent, calls the connector action with the tracking number, and returns: β€œYour order is currently in transit via FedEx. Estimated delivery: Thursday, May 8.”

Scenario: Priya registers a background screening API

Priya at AgentForge needs her recruitment agent to trigger background checks on shortlisted candidates. The screening vendor provides a REST API but no OpenAPI spec, and only AgentForge’s recruitment agent uses it.

Priya chooses a REST API tool β€” no need for the overhead of a custom connector since only one agent uses this API. She configures a POST endpoint to /api/v2/screening/initiate, adds the API key as a header, defines the request body (candidate name, email, consent reference), and maps the response schema (screening ID, estimated completion date, status).

She scopes the tool to the β€œCandidate Shortlist” topic only β€” the agent should only trigger screening during the shortlisting flow, not randomly in general conversation. When Priya’s team shortlists a candidate, the agent asks: β€œShall I initiate the background check for this candidate?” On confirmation, it calls the API and returns: β€œBackground check initiated. Reference: SCR-2024-1847. Expected completion: 3 business days.”

Question

What is the key difference between a topic HTTP request and a REST API tool?

Click or press Enter to reveal answer

Answer

A topic HTTP request runs inside a topic flow β€” you control exactly when it fires. A REST API tool is available to the orchestrator and the agent autonomously decides when to call it based on the user's intent.

Click to flip back

Question

When should you build a custom connector instead of using a REST API tool?

Click or press Enter to reveal answer

Answer

When multiple agents or Power Platform apps need the same API integration. Custom connectors are published to the connector gallery and reusable across the environment. REST API tools are configured inline per agent.

Click to flip back

Question

Why are tool descriptions critical for correct agent behaviour?

Click or press Enter to reveal answer

Answer

The orchestrator reads the tool description to decide when to invoke it. Vague descriptions cause the tool to fire incorrectly or not at all. Descriptions should clearly state what the tool does and what input it needs.

Click to flip back

Question

What authentication types does a custom connector support?

Click or press Enter to reveal answer

Answer

API key, OAuth 2.0 (authorization code or client credentials), Windows authentication, or no authentication. Auth is configured at the connector level and shared across all connections.

Click to flip back

Question

What is the difference between a global and a topic-scoped REST API tool?

Click or press Enter to reveal answer

Answer

Global: available to the orchestrator across all conversations β€” the agent can call it anytime. Topic-scoped: only available within specific topics β€” the orchestrator only considers it during those conversation flows.

Click to flip back

Knowledge Check

Dev's logistics company has four agents that all need to call the same shipping API. What should Dev build?

Knowledge Check

Priya configures a REST API tool but the agent never calls it, even when users ask relevant questions. What is the most likely cause?

Knowledge Check

An exam question describes a scenario where the developer places an HTTP call inside a topic flow at a specific step. Which mechanism is this?