Microsoft 365 Copilot MCP Setup

Connect TollBit to Microsoft 365 Copilot as a custom federated connector

TollBit connects to Microsoft 365 Copilot as a custom federated connector, over the Model Context Protocol (MCP). Once it's set up, your users can ask Copilot to search publisher content, check prices, buy articles and query TollBit analytics, signed in with their own TollBit account. This guide follows Microsoft's Set up custom federated connectors, with the values TollBit needs.

Setup takes about fifteen minutes, in four steps:

  1. Register Microsoft 365 Copilot with TollBit, with one command.
  2. Register TollBit's OAuth details in the Teams Developer Portal.
  3. Create the connector in the Microsoft 365 admin center and roll it out.
  4. Tell TollBit your client ID, and let your users know it's available.

Before You Start

  • Global Administrator or AI Administrator role in the Microsoft 365 admin center.
  • Access to the Teams Developer Portal at dev.teams.microsoft.com.
  • A terminal with curl (macOS, Linux, or Windows 10 and later), or Windows PowerShell.
  • Users need a Microsoft 365 Copilot license. They don't need a TollBit account to start: they can connect as a guest and sign in later.

Step 1: Register Microsoft 365 Copilot With TollBit

Run this command once. Replace <Your company> with your company's name, so you and TollBit can recognize the registration. It creates an OAuth client for your tenant and returns its credentials.

curl -s https://oauth.tollbit.com/oauth2/register \
  -H 'Content-Type: application/json' \
  -d '{
    "client_name": "Microsoft 365 Copilot - <Your company>",
    "redirect_uris": ["https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect"],
    "token_endpoint_auth_method": "client_secret_basic"
  }'
$body = @{
  client_name = "Microsoft 365 Copilot - <Your company>"
  redirect_uris = @("https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect")
  token_endpoint_auth_method = "client_secret_basic"
} | ConvertTo-Json
Invoke-RestMethod -Method Post -Uri "https://oauth.tollbit.com/oauth2/register" `
  -ContentType "application/json" -Body $body

The response contains these values:

ValueWhat to Do With It
client_idEnter it in the Teams Developer Portal in step 2, and send it to TollBit in step 4.
client_secretEnter it in the Teams Developer Portal in step 2. Treat it like a password: don't email it or share it.
registration_access_tokenNot needed. Don't share it; you can discard it.

Step 2: Register TollBit in the Teams Developer Portal

  1. Sign in to the Teams Developer Portal at dev.teams.microsoft.com.
  2. Go to Tools → OAuth Client Registration and click New OAuth connection.
  3. Enter the values below. Leave PKCE on, and under Restrict usage allow Any Teams app.
  4. Click Save, and copy the OAuth client registration ID the portal shows. You need it in step 3.
FieldValue
NameTollBit
Base URLhttps://mcp.tollbit.com/mcp
Client IDclient_id from step 1.
Client secretclient_secret from step 1.
Authorization endpointhttps://oauth.tollbit.com/oauth2/auth
Token endpointhttps://oauth.tollbit.com/oauth2/token
Refresh endpointhttps://oauth.tollbit.com/oauth2/token
Scopesopenid offline_access tollbit:discover tollbit:analytics tollbit:spend
Proof Key for Code Exchange (PKCE)On.

Step 3: Create the Connector and Roll It Out

  1. Sign in to the Microsoft 365 admin center at admin.microsoft.com.
  2. Go to Copilot → Connectors → Gallery. Under Created by your org, on the Create a new connector tile, click Add.
  3. Under Connect to MCP server, click Add, and enter the values below.
  4. Click Save. The connector appears under Your connections.
  5. Open it from Your connections and enable it. To test first, choose Staged rollout and add a few users or a group, then click Deploy to all users when you're ready.
FieldValue
Display nameTollBit
DescriptionSearch, price and buy publisher content from TollBit, and query TollBit analytics for the signed-in user's organization.
Base URLhttps://mcp.tollbit.com/mcp
Registration IDThe OAuth client registration ID from step 2.
🚧

Custom connectors are available only while Allow agents and plugins built by your organization is selected in Agents → Settings → Agent and plugin access, and only to users included in Agents → Settings → User access. Changes can take up to 10 minutes to reach users.

Step 4: Finish Up

  • Send TollBit your client ID, not the secret, to [email protected] or your TollBit contact. It lets TollBit match the registration to your company if you need help or want access removed.
  • Tell your users TollBit is available, and that they connect it from Settings → Sources in Copilot Chat.

What Your Users Will See

When a user connects TollBit from Sources, TollBit's sign-in page offers two choices:

  • Sign in with their TollBit account. They can search, check prices, buy content and use analytics, and they approve TollBit's access on a consent screen.
  • Continue as guest. They can search and check prices. Buying content and analytics need an account: when a tool needs one, the user disconnects TollBit in Sources, connects again and chooses Sign in.

Each user signs in separately, so a user's TollBit access is limited to their own account.

Rotating or Removing Access

  • To pause TollBit, disable the connector in Copilot → Connectors → Your connections. To remove it, delete it there.
  • To rotate the client secret or remove TollBit's side of the registration, email [email protected] with your client ID.

Troubleshooting

ProblemWhat to Do
Users can't find TollBit in SourcesCheck, in order: the connector is enabled; the user is in the staged rollout and in User access; Allow agents and plugins built by your organization is selected; the user has a Copilot license; 10 minutes have passed and the user refreshed Copilot.
It works only for the administratorThe rollout is probably staged to the administrator only, or other users haven't connected TollBit in Sources yet.
invalid_client when connectingCheck the client ID and secret were copied in full. If they were, run the step 1 command again with client_secret_post in place of client_secret_basic, and update the registration in the Teams Developer Portal with the new values.
Redirect URL errorThe registration must use https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect exactly. Register again with the command in step 1.
Registration command returns an errorCheck the command was copied in full, including the quotes. If it still fails, send the error text to [email protected].

Did this page help you?