> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/maiagent-user-guide-ja/conversations/teams.md).

# 対話プラットフォーム連携：Microsoft Teams

## 連携前の確認事項 <a href="#pre-integration-checklist" id="pre-integration-checklist"></a>

* [MaiAgent プラットフォーム](https://admin.maiagent.ai/)上で「AI アシスタント」をすでに作成済みであること
* Microsoft 365 アカウント（企業版または教育版）をお持ちであること
* [Microsoft Azure Portal](https://portal.azure.com/) のアカウントと管理権限をお持ちであること
* Microsoft Entra ID（旧称 Azure AD）のアプリケーション登録権限をお持ちであること

{% hint style="warning" %}
Teams Bot には組織レベルの Microsoft 365 アカウントが必要です。個人アカウントではご利用いただけません。
{% endhint %}

***

## ステップ 1：Azure で Bot リソースを作成する <a href="#step-create-azure-bot-resource" id="step-create-azure-bot-resource"></a>

### 1. Azure Bot を作成する <a href="#step-create-azure-bot" id="step-create-azure-bot"></a>

[Azure Portal](https://portal.azure.com/) にログインし、<mark style="color:blue;">AI Foundry</mark>（または Bot Services）を検索して、<mark style="color:blue;">Azure Bot</mark> を見つけ、<mark style="color:blue;">作成</mark>をクリックします。

<figure><img src="/files/nFGXMlNCGs1AcjeTxYMH" alt=""><figcaption><p>AI Foundry で Azure Bot を選択</p></figcaption></figure>

<figure><img src="/files/tzjy5TuZCfr3uocwGQAw" alt=""><figcaption><p>サブスクリプションプランを選択して Azure Bot を作成</p></figcaption></figure>

### 2. Bot 作成フォームを入力する <a href="#step-fill-bot-creation-form" id="step-fill-bot-creation-form"></a>

| 項目                   | 説明                                             |
| -------------------- | ---------------------------------------------- |
| **Bot ハンドル**         | 一意の Bot 名を入力します（例：`MaiAgentTeamsBot`）          |
| **サブスクリプション**        | ご利用の Azure サブスクリプションを選択します                     |
| **リソースグループ**         | 既存のリソースグループを選択するか、新規に作成します                     |
| **価格レベル**            | F0（無料）を選択することをおすすめします                          |
| **Microsoft App ID** | 「新しい Microsoft App ID を作成する」を選択するか、既存のものを使用します |

<figure><img src="/files/wzwQ0VEohjEXk5wc9Z3O" alt=""><figcaption><p>Azure Bot 作成フォームを入力</p></figcaption></figure>

<mark style="color:blue;">確認および作成</mark>をクリックし、確認後に<mark style="color:blue;">作成</mark>をクリックします。

***

## ステップ 2：App ID とパスワードを取得する <a href="#step-get-app-id-and-secret" id="step-get-app-id-and-secret"></a>

### 1. Microsoft App ID を取得する <a href="#step-get-microsoft-app-id" id="step-get-microsoft-app-id"></a>

作成完了後、Azure Bot リソースに移動し、<mark style="color:blue;">構成</mark>をクリックすると **Microsoft App ID** が確認できます。コピーして控えておきます。

<figure><img src="/files/UWF9KnBxgcJDYmMceNgz" alt=""><figcaption><p>Azure Bot 構成 — Microsoft App ID を取得</p></figcaption></figure>

### 2. クライアントシークレットを作成する <a href="#step-create-client-secret" id="step-create-client-secret"></a>

<mark style="color:blue;">証明書とシークレット</mark>をクリックし（または Microsoft Entra ID → アプリケーション登録で該当する App を見つけ）、<mark style="color:blue;">新しいクライアントシークレット</mark>をクリックして、説明と有効期限を設定した後に<mark style="color:blue;">追加</mark>をクリックします。

<figure><img src="/files/8mDLxo2Ctgnod7dJHz6r" alt=""><figcaption><p>クライアントシークレット（Signing Secret）を作成</p></figcaption></figure>

{% hint style="danger" %}
クライアントシークレットの「値」は一度しか表示されません。必ずすぐにコピーし、安全に保管してください。
{% endhint %}

***

## ステップ 3：API 権限を設定する <a href="#step-configure-api-permissions" id="step-configure-api-permissions"></a>

### 1. アプリケーション登録に移動する <a href="#step-go-to-app-registration" id="step-go-to-app-registration"></a>

Azure Portal で <mark style="color:blue;">Microsoft Entra ID</mark> を検索し、<mark style="color:blue;">アプリケーション登録</mark>に移動して、Bot に対応するアプリケーションを見つけます。

<figure><img src="/files/mSfWd7eRzRemFp1e3xBv" alt=""><figcaption><p>Microsoft Entra ID — アプリケーション登録</p></figcaption></figure>

### 2. API 権限を追加する <a href="#step-add-api-permissions" id="step-add-api-permissions"></a>

左側メニューの <mark style="color:blue;">API のアクセス許可</mark>をクリックし、<mark style="color:blue;">アクセス許可の追加</mark>をクリックします。

<figure><img src="/files/EOsZp5RyYFkm0xFP83Hf" alt=""><figcaption><p>API のアクセス許可ページ</p></figcaption></figure>

### 3. Microsoft Graph を選択する <a href="#step-select-microsoft-graph" id="step-select-microsoft-graph"></a>

<mark style="color:blue;">Microsoft Graph</mark> → <mark style="color:blue;">アプリケーションのアクセス許可</mark>を選択し、`User.Read.All` を検索してチェックを入れ、<mark style="color:blue;">アクセス許可の追加</mark>をクリックします。

<figure><img src="/files/GTMySQJZPbRwjTiHJnPl" alt=""><figcaption><p>アプリケーションのアクセス許可を選択</p></figcaption></figure>

<figure><img src="/files/htOo1tpTKkKoLH1QC44A" alt=""><figcaption><p>User.Read.All 権限を追加</p></figcaption></figure>

### 4. 管理者の同意を付与する <a href="#step-grant-admin-consent" id="step-grant-admin-consent"></a>

API のアクセス許可ページに戻り、<mark style="color:blue;">{組織名} に管理者の同意を与えます</mark>をクリックします。

<figure><img src="/files/DvKKtlXRTcXZr19y0r9p" alt=""><figcaption><p>管理者の同意を付与すると、状態が緑色のチェックマークで表示される</p></figcaption></figure>

***

## ステップ 4：MaiAgent で Teams 対話プラットフォームを作成する <a href="#step-create-teams-channel-in-maiagent" id="step-create-teams-channel-in-maiagent"></a>

### 1. 対話プラットフォーム連携に移動する <a href="#step-go-to-channel-integration" id="step-go-to-channel-integration"></a>

MaiAgent の左側メニューで <mark style="color:blue;">対話プラットフォーム</mark>をクリックし、<mark style="color:blue;">対話プラットフォームを連携する</mark>をクリックして、<mark style="color:blue;">Azure Bot</mark>（Microsoft Teams）を選択します。

### 2. 基本設定を入力する <a href="#step-fill-basic-settings" id="step-fill-basic-settings"></a>

| 項目                         | 説明                                  |
| -------------------------- | ----------------------------------- |
| **名称**                     | この連携に名前を付けます（必須）                    |
| **AI アシスタント**              | 紐付ける AI アシスタントを選択します                |
| **Microsoft App ID**       | ステップ 2 で取得したアプリケーション ID を貼り付けます（必須） |
| **Microsoft App Password** | ステップ 2 で取得したクライアントシークレットを貼り付けます（必須） |

### 3. 保存して Webhook URL を取得する <a href="#step-save-and-get-webhook-url" id="step-save-and-get-webhook-url"></a>

<mark style="color:blue;">対話プラットフォームを連携する</mark>をクリックして作成を完了します。システムが **Webhook URL** を生成しますので、コピーして控えておきます。

***

## ステップ 5：Azure に戻ってメッセージエンドポイントとチャネルを設定する <a href="#step-configure-message-endpoint-and-channel-in-azure" id="step-configure-message-endpoint-and-channel-in-azure"></a>

### 1. メッセージエンドポイントを設定する <a href="#step-set-message-endpoint" id="step-set-message-endpoint"></a>

Azure Bot リソースに戻り、<mark style="color:blue;">Bot プロファイル</mark>（構成）に移動して、MaiAgent が生成した **Webhook URL** を<mark style="color:blue;">メッセージエンドポイント</mark>の項目に貼り付け、<mark style="color:blue;">適用</mark>をクリックします。

<figure><img src="/files/8xrcwnrT3zGlyr68kmvH" alt=""><figcaption><p>Bot プロファイル — メッセージエンドポイント（Webhook URL）を入力</p></figcaption></figure>

### 2. Microsoft Teams チャネルを有効化する <a href="#step-enable-microsoft-teams-channel" id="step-enable-microsoft-teams-channel"></a>

左側メニューで <mark style="color:blue;">チャネル</mark>をクリックし、<mark style="color:blue;">Microsoft Teams</mark> チャネルが有効化され、状態が Healthy であることを確認します。

<figure><img src="/files/AxHiiYFp1iTGa8zMOoeh" alt=""><figcaption><p>チャネル設定 — Microsoft Teams チャネルが接続済み</p></figcaption></figure>

***

## ステップ 6：Teams に Bot をインストールする <a href="#step-install-bot-in-teams" id="step-install-bot-in-teams"></a>

### 方法 1：Teams Admin Center からアップロードする <a href="#method-upload-via-teams-admin-center" id="method-upload-via-teams-admin-center"></a>

組織内のすべてのユーザーに利用させる必要がある場合は、[Teams Admin Center](https://admin.teams.microsoft.com/) から App Manifest をアップロードできます。

1. [Teams Admin Center](https://admin.teams.microsoft.com/) にログインし、<mark style="color:blue;">Manage apps</mark> に移動します
2. <mark style="color:blue;">Upload new app</mark> をクリックし、Teams App Manifest（.zip ファイル）をアップロードします

<figure><img src="/files/HHOses0ukFkMJeeJBVvQ" alt=""><figcaption><p>Teams Admin Center — アプリケーションの管理</p></figcaption></figure>

<figure><img src="/files/Vs8iTvTkNAL4LzkTQAww" alt=""><figcaption><p>アップロードした App の詳細情報</p></figcaption></figure>

{% hint style="info" %}
Teams App Manifest のテンプレートは [Google Drive](https://drive.google.com/drive/folders/1E2i3y15oC65xu_5zFIXN7yG9KBgp34KB) からダウンロードできます。その中の Bot ID をご自身の Microsoft App ID に変更する必要があります。
{% endhint %}

### 方法 2：Teams アプリケーションから検索する <a href="#method-search-via-teams-app" id="method-search-via-teams-app"></a>

1. Microsoft Teams を開き、左側の <mark style="color:blue;">アプリ</mark>をクリックします
2. ご自身の Bot 名を検索します
3. <mark style="color:blue;">開く</mark>または<mark style="color:blue;">追加</mark>をクリックして Bot をインストールします

<figure><img src="/files/WinfYDA2PLTshwvISgE6" alt=""><figcaption><p>Teams アプリケーションで Bot を検索してインストール</p></figcaption></figure>

<figure><img src="/files/K05jiLdo3VWnDBzN8scK" alt=""><figcaption><p>Bot のインストールを確認し、権限を確認する</p></figcaption></figure>

***

## 利用を開始する <a href="#getting-started" id="getting-started"></a>

インストール完了後、Teams のチャットリストで Bot を見つけられます。そのままメッセージを送信するだけで AI アシスタントと対話できます。

<figure><img src="/files/mWe5b5GrKcNleTUrQU59" alt=""><figcaption><p>Teams で MaiAgent Bot との対話を開始</p></figcaption></figure>

<figure><img src="/files/6VKPoa1AeRd0sPCT9JOA" alt=""><figcaption><p>Teams 対話デモ — AI アシスタントが自動で応答</p></figcaption></figure>

***

## 重要な注意事項 <a href="#important-notes" id="important-notes"></a>

{% hint style="warning" %}
**セキュリティ**

* クライアントシークレットは適切に保管し、決して公開・共有しないでください
* クライアントシークレットを定期的に更新することをおすすめします

**制限事項**

* Bot はチームチャネル内では @ メンションされた場合にのみ応答します（1 対 1 のダイレクトメッセージでは不要です）
* Azure Bot Service の無料レベル（F0）では、月あたり 10,000 件のメッセージを処理できます

**トラブルシューティング**

* **Bot が応答しない**：Webhook URL（メッセージエンドポイント）が正しく設定されているか確認してください
* **Teams で Bot が見つからない**：Teams Admin Center で Manifest がアップロードされ、承認済みであるか確認してください
* **権限エラー**：API 権限に管理者の同意が付与されているか確認してください
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.maiagent.ai/maiagent-user-guide/maiagent-user-guide-ja/conversations/teams.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
