Edit

Confirmation prompts for MCP and API plugins for Microsoft 365 Copilot

Important

Plugins are only supported as actions within declarative agents. They are not enabled in Microsoft 365 Copilot.

The first time Microsoft 365 Copilot uses a Model Context Protocol (MCP) or API plugin, it notifies the user and asks them to allow or cancel the operation. If the user allows Copilot to connect to the plugin, all future operations that retrieve data (HTTP GET operations) don't require any confirmation. Other HTTP operations prompt the user, showing the data to be sent and giving the user a choice to allow or decline.

Copilot confirmation dialog for connecting to a plugin for the first time

Plugin developers can change this behavior for individual operations in their MCP server or API. Developers can also customize the text that Copilot displays to the user as part of the confirmation prompt.

Overriding prompt behavior

Developers can control whether Microsoft 365 Copilot asks the user for confirmation (after the initial first-time prompt) for a specific tool by setting the readOnlyHint property to true for the tool in the MCP server's tools/list response. For more information, see the MCP schema reference.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      {
        "name": "get_weather",
        "title": "Weather Information Provider",
        "description": "Get current weather information for a location",
        "annotations": {
          "readOnlyHint": true,
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "City name or zip code"
            }
          },
          "required": ["location"]
        }
      }
    ]
  }
}

Customizing confirmation text

Developers can specify the confirmation text by setting the body property in the Confirmation object in the function's Function capabilities object in the plugin manifest. The value of body should be indicative of what the function does. If this property isn't present in the manifest, the description property in the Function object is used instead.

{
  "name": "GetBudgets",
  "description": "Returns details including name and available funds of budgets, optionally filtered by budget name",
  "capabilities": {
    "confirmation": {
      "type": "AdaptiveCard",
      "title": "Search budgets",
      "body": "Do you want to allow searching for budgets?"
    }
  }
}

Localizing confirmation text

You can configure localizable strings to be used as confirmation prompts. The following steps describe the process.

Step 1: Use localization keys in the plugin manifest

In your plugin manifest (for example, plugin.json), replace literal strings with localization keys using the format:

    {
      "schema_version": "v2.3",
      "name_for_human": "[[plugin_name]]",
      "description_for_human": "[[plugin_description]]"
    }

These keys (for example, plugin_name and plugin_description) must match entries in your localization file and conform to the regex ^[a-zA-Z_][a-zA-Z0-9_]*.

Step 2: Create localization files

Create your localization files in JSON format and include a localizationKeys property that maps each key to its translated string, as shown in the following example.

    {
  "localizationKeys": {
    "plugin_name": "Weather Assistant",
    "plugin_description": "Provides weather updates and forecasts."
      }
    }

You can create multiple localization files for different languages (for example, en.json, fr.json, de.json) and reference them in your plugin configuration.

Step 3: Add localizationInfo to the App Manifest

Include a localizationInfo section in your app manifest that references the localization files. For example,

    "localizationInfo": {
      "defaultLanguageTag": "en",
      "defaultLanguageFile": "en.json",
      "additionalLanguages": [
        {
          "languageTag": "fr",
          "file": "fr.json"
        }
      ]
    }

Plugins for Microsoft 365 Copilot