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

# Copilot Studio - Connect StackOne

> Use the StackOne MCP server to connect your work systems to Copilot Studio.

For people building agents in Copilot Studio. Chatting with an agent your organization already built in Microsoft 365 Copilot? Follow [Organization User Setup](https://docs.stackone.com/ai-platforms/microsoft/microsoft-365-copilot/connect-stackone.md) instead.

## Choose how the agent signs in

Every Copilot Studio agent reaches StackOne through OAuth, so nobody pastes an API key or token. What changes is whose StackOne login the agent uses:

| | Chat agent | Background agent |
| - | - | - |
| Runs when | Someone chats with it in Copilot Studio, Teams or Microsoft 365 Copilot | A workflow trigger fires, such as a schedule, with nobody chatting |
| Signs in to StackOne as | Each person, with their own login | You, the person who owns the workflow |
| Reaches | The Linked Accounts and actions each person authorized | The Linked Accounts and actions you authorized |
| Set up in | [Add StackOne to the agent](#add-stackone-to-the-agent), then [Set who the agent acts as](#set-who-the-agent-acts-as) | [Add StackOne to the agent](#add-stackone-to-the-agent), then [Run it in the background](#run-it-in-the-background) |

## Before you start

In Microsoft 365, you need a Copilot Studio license or the Copilot Studio authors role. If your organization uses Power Platform data policies, the policy must allow custom MCP connectors, because Copilot Studio treats the StackOne MCP server as a connector.

In StackOne:

* A StackOne [project](https://docs.stackone.com/gateway/concepts/organizations-and-projects.md) you are a member of.
* A [connector profile](https://docs.stackone.com/connect/managing-connectors/connector-profiles.md) in the project for each provider the client should reach, with the actions you want exposed enabled.
* (Optional) A [linked account](https://docs.stackone.com/connect/managing-connectors/linking-accounts.md) for each provider. Accounts can also be linked during the consent flow.

## Add StackOne to the agent

> [tab] Add it to your agent
>
> **1. Open the MCP server dialog**
>
> 1. Open your agent in [Copilot Studio](https://copilotstudio.microsoft.com).
> 2. Under **Tools**, click **+**.
> 3. Click **+ Add**, then **Model Context Protocol (MCP)**.
>
> **2. Describe the server**
>
> Set the following, then click **Add**:
>
> * **Server name**: for example `StackOne`.
> * **Server description**: what the agent should use StackOne for, such as `Read and update records in HR, CRM and ticketing systems through StackOne`. The agent reads it to decide when to call StackOne.
> * **Server URL**: `https://mcp.stackone.com/mcp`.
> * **Authentication**: `OAuth 2.0`.
> * **Configuration type**: `Dynamic (with discovery)`. Copilot Studio registers itself with StackOne, so there's no client ID or secret to enter.
>
> **3. Create the connection**
>
> 1. Open the **Not connected** menu and click **Create new connection**.
> 2. Click **Create**. StackOne opens in a pop-up.
>
> **4. Sign in and authorize**
>
> 1. Sign in to StackOne. In a desktop app or code editor, this opens in your browser.
> 2. Check the project at the top left. Copilot Studio only reaches Linked Accounts in that project. To use another one, click it and pick yours.
> 3. Pick the work systems Copilot Studio can use (your Linked Accounts).
> 4. If you see **Load tools when needed**, leave it on.
> 5. Click **Authorize**.
>
> ![StackOne's consent screen for Claude, with three Linked Accounts selected, Load tools when needed on, and the Authorize button](https://mintcdn.com/stackone-60/YmZbq_bZpKKfcffI/images/ai-platforms/oauth-consent-connect-to-your-tools.png?fit=max\&auto=format\&n=YmZbq_bZpKKfcffI\&q=85\&s=f7600605abcc0b446e7996945b0b6090)
>
> **5. Add the tool and save**
>
> 1. Back in Copilot Studio, click **Add**.
> 2. Save the agent. Tools added to a new agent are kept only once the agent is saved.

> [tab] Use your own OAuth client
>
> Use this when **Create new connection** fails before StackOne opens, or when you want the agent's sign-ins to run through a client you name, can rotate, and can filter StackOne logs by. You create the client in StackOne and enter it in Copilot Studio, so Copilot Studio doesn't register itself. See [Clients requiring Client ID and Secret](https://docs.stackone.com/ai-platforms/mcp-server.md#clients-requiring-client-id-and-secret) for how these clients work.
>
> **1. Create the client in StackOne**
>
> 1. Go to **Project Settings → MCP OAuth Clients → Create OAuth Client**.
> 2. Name it after the agent, for example `Copilot Studio - HR agent`, and leave **Client type** set to `Confidential`. You add the redirect URI in a later step.
> 3. Click **Generate** and copy the client ID and secret. The secret is shown only once.
>
> **2. Describe the server**
>
> 1. Open your agent in [Copilot Studio](https://copilotstudio.microsoft.com).
> 2. Under **Tools**, click **+**, then **+ Add** and **Model Context Protocol (MCP)**.
> 3. Enter the **Server name**, **Server description** and **Server URL** `https://mcp.stackone.com/mcp`, as in **Add it to your agent**.
> 4. Set **Authentication** to `OAuth 2.0` and **Configuration type** to `Manual`, then fill in:
>
> | Field | Value |
> | - | - |
> | Client ID | From the first step |
> | Client secret | From the first step |
> | Authorization URL | `https://idp-api.stackone.com/api/auth/oauth2/authorize` |
> | Token URL template | `https://idp-api.stackone.com/api/auth/oauth2/token` |
> | Refresh URL | `https://idp-api.stackone.com/api/auth/oauth2/token` |
> | Scopes | `mcp offline_access` |
>
> `offline_access` lets Copilot Studio renew access every hour without asking people to sign in again. Click **Create**.
>
> **3. Add the callback URL to the client**
>
> 1. Copy the callback URL Copilot Studio shows. It starts with `https://global.consent.azure-apim.net/redirect/`, and each server you add gets its own.
> 2. In StackOne, open the client under **MCP OAuth Clients**, paste the URL on its own line under redirect URIs and save.
>
> **4. Create the connection**
>
> Back in Copilot Studio, click **Next**, then **Create new connection** and **Create**. StackOne opens in a pop-up.
>
> **5. Sign in and authorize**
>
> 1. Sign in to StackOne. In a desktop app or code editor, this opens in your browser.
> 2. Check the project at the top left. Copilot Studio only reaches Linked Accounts in that project. To use another one, click it and pick yours.
> 3. Pick the work systems Copilot Studio can use (your Linked Accounts).
> 4. If you see **Load tools when needed**, leave it on.
> 5. Click **Authorize**.
>
> ![StackOne's consent screen for Claude, with three Linked Accounts selected, Load tools when needed on, and the Authorize button](https://mintcdn.com/stackone-60/YmZbq_bZpKKfcffI/images/ai-platforms/oauth-consent-connect-to-your-tools.png?fit=max\&auto=format\&n=YmZbq_bZpKKfcffI\&q=85\&s=f7600605abcc0b446e7996945b0b6090)
>
> **6. Add the tool and save**
>
> 1. Click **Add**.
> 2. Save the agent.

> [tab] Use the Agent 365 server
>
> Use this when your IT team registered StackOne in Agent 365, as in [Organization Admin Setup](https://docs.stackone.com/ai-platforms/microsoft/microsoft-365-copilot/organization-admin-setup.md). Your admin tells you the server's name.
>
> **1. Add the server**
>
> 1. Open your agent in [Copilot Studio](https://copilotstudio.microsoft.com).
> 2. On the agent's **Tools** page, select **Add a tool**, then **Model Context Protocol**.
> 3. Select the server from the list.
>
> ![The Add a tool dialog in Copilot Studio with the Model Context Protocol filter selected, listing MCP servers to add](https://mintcdn.com/stackone-60/PxWMQ9IOz3sntjnj/images/ai-platforms/microsoft/microsoft-365-copilot-studio-add-tool-mcp.png?fit=max\&auto=format\&n=PxWMQ9IOz3sntjnj\&q=85\&s=56e9ae99a57b8a6fcdf6ee0a49fb35cf)
>
> **2. Create the connection**
>
> Select **Create a new connection** and sign in with your Microsoft work account. Then add the server to the agent and save the agent.
>
> **3. Connect your StackOne login**
>
> Agent 365 asks each person to connect StackOne once, through a setup link in Power Apps. Follow **Connect StackOne** in [Organization User Setup](https://docs.stackone.com/ai-platforms/microsoft/microsoft-365-copilot/connect-stackone.md).

Through the [Advanced Tool Search](https://docs.stackone.com/optimize/advanced-tool-search.md) tools, the agent finds and runs the actions each sign-in granted. Click **Preview** and ask the agent:

```text theme={null}
Which of my Linked Accounts can you reach through StackOne?
```

## Set who the agent acts as

A chat agent signs in to StackOne as whoever is chatting, which is the default.

1. Under **Tools**, click StackOne.
2. Check that **Authentication** is set to **End user account**, so each person signs in with their own StackOne login.
3. If you changed it, click **Done** and save the agent.

**Shared account** makes everyone who chats with the agent use your StackOne connection, and reach the Linked Accounts you authorized. Keep it for agents where every user should see the same data.

## Run it in the background

Copilot Studio runs unattended work as a workflow. A workflow's tools always use the connection of the person who added them, so StackOne acts as you.

**1. Create the workflow**

1. In Copilot Studio, go to **Workflows** and click **New workflow**.
2. Under **Trigger type**, choose what starts it, such as **Recurrence** for a schedule.

**2. Add an agent step**

1. In **Add**, click **Agent**.
2. Under **Agent**, choose a published agent, or **New agent for this workflow** and write its instructions. Unpublished agents must be published before a workflow can use them.

**3. Give the agent StackOne**

For **New agent for this workflow**:

1. Under **Tools**, click **+**.
2. Search for the StackOne server you added, select it and click **Add**.
3. Choose your existing StackOne connection and click **Add**.

**4. Test and publish**

1. Open **Run node** and click **Run**. The output shows what the agent got back from StackOne.
2. Click **Publish**.

> [!WARNING]
>
> A background agent can do everything your StackOne authorization allows. Anyone who can edit or trigger the workflow uses that access. When you authorize, **select only the Linked Accounts and actions the workflow needs**.

> [accordion] If something goes wrong
>
> **Creating the connection fails before StackOne opens.** StackOne sometimes refuses Copilot Studio's automatic registration. Remove the tool and add it again from the **Use your own OAuth client** tab, which skips that registration.
>
> **StackOne opens but reports a redirect URI error.** The callback URL Copilot Studio showed isn't on your StackOne client. Add it under **MCP OAuth Clients**, then create the connection again.
>
> **The agent only replies with a setup link.** You're using the Agent 365 server and haven't connected StackOne yet. Open the link and follow [Organization User Setup](https://docs.stackone.com/ai-platforms/microsoft/microsoft-365-copilot/connect-stackone.md).
>
> **New accounts or actions don't show up.** Copilot Studio keeps the same tools for a whole chat. Start a new chat.
>
> **A workflow stopped working.** Access lasts 90 days from when you clicked **Authorize**. Under **Tools**, click StackOne, then **Manage connections**, and sign in again.
>
> **It can't do something.** It can do only what the StackOne authorization allows. Ask your StackOne admin.

> [accordion] Add or change accounts
>
> Copilot Studio reaches only the Linked Accounts you approved when you connected. To add one you link later, or one someone shares with you afterwards:
>
> **1. Open Connected Apps**
>
> In the StackOne dashboard, go to [**Connected Apps**](https://app.stackone.com/connected_apps).
>
> **2. Edit the connection**
>
> 1. Open the **⋮** menu on the row for Copilot Studio and select **Edit tool access**.
> 2. Select the Linked Account.
> 3. Click **Save changes**.
>
> To review or revoke the connection, use the same **⋮** menu in **Connected Apps**.


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