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:
- Register Microsoft 365 Copilot with TollBit, with one command.
- Register TollBit's OAuth details in the Teams Developer Portal.
- Create the connector in the Microsoft 365 admin center and roll it out.
- 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 $bodyThe response contains these values:
| Value | What to Do With It |
|---|---|
client_id | Enter it in the Teams Developer Portal in step 2, and send it to TollBit in step 4. |
client_secret | Enter it in the Teams Developer Portal in step 2. Treat it like a password: don't email it or share it. |
registration_access_token | Not needed. Don't share it; you can discard it. |
Step 2: Register TollBit in the Teams Developer Portal
- Sign in to the Teams Developer Portal at dev.teams.microsoft.com.
- Go to Tools → OAuth Client Registration and click New OAuth connection.
- Enter the values below. Leave PKCE on, and under Restrict usage allow Any Teams app.
- Click Save, and copy the OAuth client registration ID the portal shows. You need it in step 3.
| Field | Value |
|---|---|
| Name | TollBit |
| Base URL | https://mcp.tollbit.com/mcp |
| Client ID | client_id from step 1. |
| Client secret | client_secret from step 1. |
| Authorization endpoint | https://oauth.tollbit.com/oauth2/auth |
| Token endpoint | https://oauth.tollbit.com/oauth2/token |
| Refresh endpoint | https://oauth.tollbit.com/oauth2/token |
| Scopes | openid offline_access tollbit:discover tollbit:analytics tollbit:spend |
| Proof Key for Code Exchange (PKCE) | On. |
Step 3: Create the Connector and Roll It Out
- Sign in to the Microsoft 365 admin center at admin.microsoft.com.
- Go to Copilot → Connectors → Gallery. Under Created by your org, on the Create a new connector tile, click Add.
- Under Connect to MCP server, click Add, and enter the values below.
- Click Save. The connector appears under Your connections.
- 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.
| Field | Value |
|---|---|
| Display name | TollBit |
| Description | Search, price and buy publisher content from TollBit, and query TollBit analytics for the signed-in user's organization. |
| Base URL | https://mcp.tollbit.com/mcp |
| Registration ID | The 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
| Problem | What to Do |
|---|---|
| Users can't find TollBit in Sources | Check, 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 administrator | The rollout is probably staged to the administrator only, or other users haven't connected TollBit in Sources yet. |
invalid_client when connecting | Check 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 error | The 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 error | Check the command was copied in full, including the quotes. If it still fails, send the error text to [email protected]. |
Updated about 18 hours ago