> For the complete documentation index, see [llms.txt](https://guides.mangoapps.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guides.mangoapps.com/ai-guide/bring-your-own-assistant/integration-with-microsoft-teams.md).

# Integration with Microsoft Teams

### Overview

This guide walks you through the process of integrating an AI Assistant (with OpenAPI access enabled) into Microsoft Teams via Microsoft Copilot Studio. The integration is achieved by creating a Power Apps custom connector, configuring it with the Assistant’s OpenAPI details, and then wiring it into a Copilot Studio Agent.

***

### High-Level Steps

1. Enable OpenAPI Access for your AI Assistant.
2. Create a Power Apps custom connector using the Assistant’s OpenAPI schema.
3. Create an Agent in Copilot Studio.
4. Add your custom connector as a tool in the Agent.
5. Enable and publish the Agent as an application.
6. Add the Agent application to Microsoft Teams.

***

### Detailed Walkthrough

#### 1. Enable OpenAPI Access

Locate the AI Assistant you want to connect.

<figure><img src="/files/Rusom2OXeebH3aNOGzyq" alt="" width="563"><figcaption></figcaption></figure>

Toggle on **Enable OpenAPI Access.**

<figure><img src="/files/qBKknhQqIRX74x1yIrqT" alt="" width="563"><figcaption></figcaption></figure>

Copy the OpenAPI JSON URL (you will need this for Power Apps).

***

#### 2. Create a Power Apps Custom Connector

Log in to your **Microsoft Power Apps dashboard** and navigate to **Custom Connectors**.

Click **+ New Custom Connector > Import an OpenAPI from URL**.

<figure><img src="/files/2R7WwUbfO3pte6GvDtq0" alt="" width="563"><figcaption></figcaption></figure>

Paste your AI Assistant’s **OpenAPI JSON URL** and provide a **name** for your connector.

<figure><img src="/files/lbMH6p87SOFXVu42bPdE" alt="" width="506"><figcaption></figcaption></figure>

Configure the connector’s security settings:

* Client ID
* Client Secret
* Authorization URL
* Token URL
* Refresh URL

<figure><img src="/files/ive7DLUEFRdNT6NSigOm" alt="" width="563"><figcaption></figcaption></figure>

Copy the connector’s Redirect URL (from the **Security tab**).

Return to your MangoApps AI Assistant’s OpenAPI Access settings and paste this Redirect URL into the Callback URL field.

<figure><img src="/files/uvg4yyHMElzCwxnptA4V" alt="" width="563"><figcaption></figcaption></figure>

***

#### 3. Create an Agent in Copilot Studio

Open Copilot Studio and create a new Agent.

<figure><img src="/files/w6kkzFnCQQBP82SELIoC" alt="" width="563"><figcaption></figcaption></figure>

In the Agent’s settings, go to the **Tools** tab.

Add a new tool by searching for “Fetch assistant answer for user query.”

{% hint style="danger" %}
Ensure the byline matches the name of your Power Apps connector.
{% endhint %}

<figure><img src="/files/DxvlS05J1QICiu20nbOX" alt="" width="563"><figcaption></figcaption></figure>

Add this tool to the Agent.

<figure><img src="/files/w2PvJHyILhDJP8GYvDIa" alt=""><figcaption></figcaption></figure>

***

#### 4. Configure Topics in Copilot Studio

Navigate to the Topics tab and create a new **Topic from Blank**.

Configure the Topic steps as follows:

1. Trigger: “A message is received.”
2. Step 1: Add a tool → Connector → select “Fetch assistant answer for user query.”
3. Step 2: Add a message → set it to output queryAnswer.message.
4. Step 3: Add an action → End all topics.

<figure><img src="/files/9H0mhYjtKibHDr1WRWnC" alt="" width="563"><figcaption></figcaption></figure>

**Save** and **Publish** the Agent.

***

#### 5. Enable Teams Channel

Navigate to the Agent’s **Channels** tab.

<figure><img src="/files/yetwLdxmLS7BjoNKz6cj" alt="" width="563"><figcaption></figcaption></figure>

Select **Teams and Microsoft 365 Copilot** and add the channel.

<figure><img src="/files/N60tD1wJ8Zyf33TExM7X" alt="" width="563"><figcaption></figcaption></figure>

Under **Availability options**, select **Show to everyone in my org**.

<figure><img src="/files/miFNUp5h8FRQnMPzcZrF" alt="" width="563"><figcaption></figcaption></figure>

Submit for admin approval.

***

#### 6. Approve & Deploy in Microsoft Teams Admin Center

To approve and deploy the assistant, an Admin must go to the **Teams Admin Center**.

Navigate to **Teams apps > Manage apps**.

<figure><img src="/files/wzyKK83SDp79ybAMjLKg" alt="" width="563"><figcaption></figcaption></figure>

Under **All apps**, search for the **name** of your Copilot Agent.

Approve and publish the app.

{% hint style="warning" %}
It could take up to a couple of hours for the app to populate in the list once it has been created.
{% endhint %}

<figure><img src="/files/aqERMhvyj8FBJtcu4icG" alt="" width="563"><figcaption></figcaption></figure>

***

#### 7. Add the App in Microsoft Teams

Open Microsoft Teams and navigate to **Apps > Built** for your org.

<figure><img src="/files/XjQoVufpyNTmZaoCwpOA" alt="" width="563"><figcaption></figcaption></figure>

Find your newly created Agent app and add it.

Your AI Assistant is now available to employees directly within Microsoft Teams!

<figure><img src="/files/RGGBrppyxXM92A42L3jY" alt="" width="563"><figcaption></figcaption></figure>
