> 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/tech/maiagent-tech-ja/authorization-integration/role-vs-contact.md).

# ロール（Role）と連絡先（Contact）の違い

## 概要

MaiAgent では2種類の権限設定方式、**Contact-based** と **Role-based** を提供しており、企業がさまざまなシーンに応じてナレッジベースへのアクセス権限を正確に制御できるよう支援します。

### Contact

MaiAgent でユーザー情報を同期して保存するストレージで、Contact ID を作成し、ユーザーの対話情報を判別するために使用します。

{% hint style="info" %}
連絡先情報について詳しくは、[🌐連絡先（Contact）の紹介と連携↗](/tech/maiagent-tech-ja/authorization-integration/contacts.md) をご参照ください。
{% endhint %}

<figure><img src="/files/yrfWwaqf5AdhWSnPJ7tF" alt=""><figcaption><p>Contact 名が未設定の場合：ユーザーはデフォルトで匿名となります</p></figcaption></figure>

### Role

AI アシスタント管理画面の編集権限を持つ役割で、企業内であらかじめ定義できます（例：カスタマーサポート担当者、事務担当者、インターンなど）。組織内では、役割が利用できる権限や参照するデータベースをあらかじめ設定でき、組織メンバーは必要に応じて役割を選択し、設定をそのまま適用できます。

<figure><img src="/files/2dnIgTuFVUsR46iI2DYC" alt=""><figcaption><p>Role ユーザーの基本情報の表示</p></figcaption></figure>

## 一、権限方式の比較

<figure><img src="/files/ZqFYcUV0rsTMMzPyAOQ5" alt=""><figcaption><p>AI アシスタントの埋め込み画面</p></figcaption></figure>

|        比較項目        |    Contact-based    |              Role-based              |
| :----------------: | :-----------------: | :----------------------------------: |
|    🎯 **適用シーン**    |    外部ユーザー、システム連携    |              内部ユーザー、組織管理             |
| 👤 **MaiAgent 登録** |        ❌ 登録不要       |            ✅ 登録して組織への参加が必要           |
|     📋 **作成方法**    |  システムによる自動作成または手動作成 |            事前定義された役割テンプレート           |
|    🔄 **更新の仕組み**   |     ユーザー情報を動的に同期    |               静的な役割権限設定              |
|     🎯 **利用目的**    |     ユーザーの対話情報を判別    | デフォルト権限設定を適用し、AI アシスタント管理画面の権限を管理・設定 |
|      👥 **対象**     |       外部訪問者、会員      |             社内従業員、組織メンバー             |
|     ⚙️ **管理方法**    |      API 連携で管理      |             管理画面の役割管理で管理             |
|     📊 **権限制御**    | Contact ID に基づく動的制御 |             Role に基づく静的制御            |

### 代表的な利用シーン

**Contact-based のシーン：役割分担や権限定義を明確にする必要がある利用シーンに適しています**

* **企業公式サイト**：訪問者が身分に応じて異なる製品情報を取得
* **会員センター**：ランクに応じて対応するサービス内容にアクセス
* **カスタマーサポートセンター**：顧客タイプに応じて差別化されたサポートを提供

**Role-based のシーン**

* **社内業務**：従業員が部門・役割に応じて業務を処理
* **カスタマーサポートチーム**：職責の範囲に応じてナレッジベースを照会
* **管理層**：権限に応じてコンテンツの審査・保守を実施

### 総合的な利用戦略

対外業務（ユーザーの身分を明確に把握する必要がない場合）には Contact-based による管理が適しています。

対内業務（権限の明確な区分が必要、または複数のメンバーが同一の権限を利用する場合）には Role-based による管理が適しています。

<figure><img src="/files/VRajgy20vas7sguXAxai" alt=""><figcaption><p>Contact と Role の権限利用に関する推奨</p></figcaption></figure>


---

# 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/tech/maiagent-tech-ja/authorization-integration/role-vs-contact.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.
