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

# セッション委譲を設定する

> 委譲セッションをリクエストして受け入れるために必要なクライアント設定の方法を説明します。

このページでは設定のみを扱います。以下の両方のアプリケーションを設定した後、セキュリティモデルとリクエスト/レスポンスの詳細については、[セッション委譲 を実装する](/docs/docs/ja-jp/authenticate/single-sign-on/session-delegation/implement-session-delegation)を参照してください。

## アプリケーションを設定する

### 要求元アプリケーションを構成する

Session Transfer Token を取得するためにカスタムトークン交換を呼び出すアプリケーションでは、カスタムトークン交換を有効にし、Session Transfer Token を作成できるように設定する必要があります。

```json lines theme={null}
{
  "token_exchange": {
    "allow_any_profile_of_type": ["custom_authentication"]
  },
  "session_transfer": {
    "can_create_session_transfer_token": true,
    "enforce_cascade_revocation": true
  }
}
```

`can_create_session_transfer_token` 設定の詳細については、[Session Transfer Token の作成と管理](/docs/docs/ja-jp/authenticate/single-sign-on/native-to-web/configure-implement-native-to-web#create-and-manage-session-transfer-tokens)を参照してください。

Session Transfer Token をリクエストするためにカスタムトークン交換を呼び出すアプリケーションは、Client Secret (または他の confidential client 向けの方法) で認証する confidential client である必要があります。標準のカスタムトークン交換リクエストとは異なり、Session Transfer Token をリクエストする場合は、`tokenEndpointAuthMethod: none` の public client オプションはサポートされていません。

### 対象の Web アプリケーションを設定する

Web アプリケーションで委任されたセッションの受け入れを明示的に opt in し、`/authorize` で Session Transfer Token をクエリパラメータとして受け入れる必要があります。

```json lines theme={null}
{
    "session_transfer": {
        "allowed_authentication_methods": ["cookie", "query"],
        "enforce_device_binding": "ip", // "none" または "asn" も指定可能
        "allow_refresh_token": false,
        "enforce_online_refresh_tokens": true,
        "delegation": {
           "allow_delegated_access": true,
           "enforce_device_binding": "ip" // 委譲で指定できる値はこれのみ
        }
    }
}
```

セッション委譲 では Session Transfer Token を URL クエリパラメータとして渡すため、`allowed_authentication_methods` に `query` を含める必要があります。ネイティブからWebへのSSO で使用される Cookie ベースの転送は、ここでは適用されません。`delegation.enforce_device_binding` に指定できるのは `"ip"` のみで、委譲されたセッションには IP ベースのデバイスバインディングが自動的に適用されます。この設定はデフォルトで無効になっており、現時点では同等の Dashboard UI トグルはありません。Management API または infrastructure-as-code ツール (Terraform、Deploy CLI) で設定してください。

actor を含む Session Transfer Token が、`allow_delegated_access` が有効になっていないクライアントに提示された場合、Auth0 はエラーを返しません。代わりにログインページを表示し、warning (`w`) テナントログを出力します。委譲されたセッションで予期せずログインプロンプトが表示される場合は、これを確認してください。

両方のアプリケーションを設定したら、リクエストの実行方法については [セッション委譲](/docs/docs/ja-jp/authenticate/single-sign-on/session-delegation/implement-session-delegation) を、セッションの動作と監査ログについては [Delegated Session Behavior and Monitoring](/docs/docs/ja-jp/authenticate/single-sign-on/session-delegation/session-delegation-behavior-and-monitoring) を参照してください。
