> ## Documentation Index
> Fetch the complete documentation index at: https://docs.watchdog.no/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Microsoft Copilot

> Connect Watchdog to Microsoft 365 Copilot with OAuth and PKCE.

Check [availability and permissions](https://docs.watchdog.no/guides/mcp) before setting up a connection.
This guide covers Microsoft 365 work or school accounts.

## Choose a setup

Use the **direct connector** to work with Watchdog in your existing Microsoft 365 Copilot chat.
This is the recommended starting point: your Microsoft administrator sets it up once for your
organization, and each person signs in with their own Watchdog account.

Choose a [Copilot Studio agent](#copilot-studio-agent) when you want to build a dedicated assistant
with your own instructions, other tools, or a Teams agent. Studio needs one extra step with
Watchdog support before anyone can sign in.

Both setups can look up and summarize your Watchdog data; make changes in Watchdog itself. Before
you start either one, email [support@watchdog.no](mailto:support@watchdog.no) for the client
secret. We send it through a one-time link. Keep it private.

## Direct Microsoft 365 connector

Your administrator needs access to the [Teams Developer Portal](https://dev.teams.microsoft.com)
and the **Global Administrator** or **AI Administrator** role in Microsoft 365. See Microsoft's
[connector requirements](https://learn.microsoft.com/en-us/microsoft-365/copilot/connectors/set-up-custom-federated-connectors).

**1. Register sign-in in the Teams Developer Portal**

Go to **Tools** → **OAuth client registration**, register a new client with the fields below,
and select **Save**.

| Field | Value |
| - | - |
| Name | `Watchdog` |
| Base URL | `https://mcp.watchdog.no/mcp/readonly` |
| Restrict usage by org | **My organization only** |
| Restrict usage by app | **Any Teams app** |
| Client ID | `r2AOuLXBI3houBrk` |
| Client secret | From support |
| Authorization endpoint | `https://clerk.watchdog.no/oauth/authorize` |
| Token endpoint | `https://clerk.watchdog.no/oauth/token` |
| Refresh endpoint | `https://clerk.watchdog.no/oauth/token` |
| Scopes | `watchdog offline_access` |
| PKCE | On |

**Restrict usage by app** must be **Any Teams app**; otherwise every request to Watchdog fails.

Use the same Base URL in the next step.

> [!WARNING]
>
> Copilot currently only supports read actions, so you must use
> `https://mcp.watchdog.no/mcp/readonly`, not `https://mcp.watchdog.no/mcp`.

Copy the **OAuth client registration ID** Microsoft shows. It is Microsoft's ID, not the
Watchdog client ID above.

**2. Add the connector in the Microsoft 365 admin center**

In the [admin center](https://admin.microsoft.com), go to **Copilot** → **Connectors** →
**Gallery**. Under **Created by your org**, select **Add** on **Create a new connector**, then
**Add** under **Connect to MCP server**. Fill in the fields below and select **Save**.

| Field | Value |
| - | - |
| Display name | `Watchdog` |
| Base URL | `https://mcp.watchdog.no/mcp/readonly` |
| Authentication | **OAuth 2.0** |
| OAuth registration ID | From the previous step |
| Developer name | `Watchdog` |
| Website URL | `https://docs.watchdog.no/guides/mcp` |
| Privacy policy URL | `https://watchdog.no/legal/privacy` |
| Terms of use URL | `https://watchdog.no/legal/terms` |

Use **Staged rollout** to make it available to a small group first. Changes can take up to 15
minutes to take effect.

**3. Sign in and test**

Each person opens Microsoft 365 Copilot Chat, goes to **…** → **Settings** → **Sources**,
selects **Connect** next to **Watchdog**, and signs in with their own Watchdog account. The
administrator's setup doesn't give anyone access to the administrator's data.

If Microsoft offers several accounts, choose the one you use for Watchdog, not an admin
account. Use **Connect** in Copilot Chat; the **Sign in** button under **Tools** in the admin
center doesn't work for every connector.

Try an [example task](https://docs.watchdog.no/guides/mcp/working-with-watchdog.md) before rolling out further.

If Copilot finds Watchdog but can't get any data, check that both steps use
`https://mcp.watchdog.no/mcp/readonly`, then disconnect and connect again in Copilot Chat.

## Copilot Studio agent

You need an agent in [Copilot Studio](https://copilotstudio.microsoft.com) with
[generative orchestration](https://learn.microsoft.com/en-us/microsoft-copilot-studio/advanced-generative-actions#turn-on-generative-orchestration-for-an-agent)
turned on, and a Microsoft administrator who can publish it (see
[licensing](https://learn.microsoft.com/en-us/microsoft-copilot-studio/faq-billing-licensing)).
Studio uses the same client ID and secret as the direct connector.

**1. Add Watchdog as a tool**

In your agent, go to **Tools** → **Add a tool** → **New tool** → **Model Context Protocol**,
fill in the fields below, and select **Create**.

| Field | Value |
| - | - |
| Server name | `Watchdog` |
| Server description | `Invoices, agreements and price checks in Watchdog` |
| Server URL | `https://mcp.watchdog.no/mcp/readonly` |
| Authentication | **OAuth 2.0**, type **Manual** |
| Client ID | `r2AOuLXBI3houBrk` |
| Client secret | From support |
| Authorization URL | `https://clerk.watchdog.no/oauth/authorize` |
| Token URL template | `https://clerk.watchdog.no/oauth/token` |
| Refresh URL | `https://clerk.watchdog.no/oauth/token` |
| Scopes | `watchdog offline_access` |

> [!WARNING]
>
> Copilot currently only supports read actions, so you must use
> `https://mcp.watchdog.no/mcp/readonly`, not `https://mcp.watchdog.no/mcp`.

**2. Send the callback URL to support**

After you select **Create**, Copilot Studio shows a **callback URL**. It looks like
`https://global.consent.azure-apim.net/redirect/...` and is unique to this tool. Copy all of
it and email it to [support@watchdog.no](mailto:support@watchdog.no).

If you closed the dialog, open [Power Apps](https://make.powerapps.com) in the same
environment, go to **Custom connectors**, open the Watchdog connector, and copy the
**Redirect URL** on the **Security** tab.

Wait until support confirms the URL is registered. Until then, signing in fails with
"The 'redirect\_uri' parameter does not match any of the OAuth 2.0 Client's pre-registered
redirect urls". If you delete and re-create the tool, or add it in another environment or
agent, it gets a new callback URL that you need to send as well.

**3. Connect**

Select **Next** → **Create a new connection**, sign in to Watchdog, and select **Add to agent**.
Set the tool to [**User authentication**](https://learn.microsoft.com/en-us/microsoft-copilot-studio/configure-enduser-authentication),
so each person signs in with their own Watchdog account.

**4. Test and publish**

Try an [example task](https://docs.watchdog.no/guides/mcp/working-with-watchdog.md), then
[publish the agent](https://learn.microsoft.com/en-us/microsoft-copilot-studio/publication-add-bot-to-microsoft-teams)
to Teams or Microsoft 365 Copilot. For Teams, also [set up single sign-on](https://learn.microsoft.com/en-us/microsoft-copilot-studio/configure-sso-teams); without it,
signing in always fails there. Test again in the published agent before sharing it.

## Disconnect

Your Microsoft administrator can disable or delete the direct connector in the admin center, and
remove the tool from a Copilot Studio agent. Each person can disconnect the direct connector in
Copilot Chat under **Settings** → **Sources**.
See [Disconnect](https://docs.watchdog.no/guides/mcp#disconnect) to revoke your Watchdog access, or
[connection help](https://docs.watchdog.no/guides/mcp/troubleshooting.md) if you get stuck.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.