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

> アプリケーションのコールバック SLO URL を設定して、外部 SAML IdP のユーザーがログアウトした際にサインアウトする方法について説明します。

# SAML IDプロバイダーからユーザーをログアウトする

シングルログアウト (SLO) は、1回のログアウト操作で複数の認証セッションを終了できる機能です。

Auth0 は、[アプリケーションを SAML IDプロバイダー (IdP) に接続する](/docs/ja-jp/authenticate/identity-providers/enterprise-identity-providers/saml)場合の SLO をサポートしており、[Auth0 を SAML IdP として設定する](/docs/ja-jp/authenticate/single-sign-on/outbound-single-sign-on/configure-auth0-saml-identity-provider)場合は、限定的な SLO をサポートしています。

<div id="configure-slo-when-application-is-connected-to-a-saml-idp">
  ## アプリケーションが SAML IdP に接続されている場合の SLO の設定
</div>

Auth0 で[ユーザーをそのアイデンティティプロバイダーからログアウト](/docs/ja-jp/authenticate/login/logout/log-users-out-of-idps)させるには、[Auth0 Authentication API の Logout エンドポイント](https://auth0.com/docs/api/authentication#logout)を呼び出すときに `federated` パラメーターを含めます。

Auth0 がログアウトリクエストを SAML <Tooltip tip="Identity Provider (IdP): デジタル ID を保存および管理するサービス。" cta="用語集を表示" href="/docs/ja-jp/glossary?term=IdP">IdP</Tooltip> のログアウトエンドポイントに送信できるようにするため、<Tooltip tip="Security Assertion Markup Language (SAML): パスワードを使わずに 2 者間で認証情報を交換できる標準化されたプロトコル。" cta="用語集を表示" href="/docs/ja-jp/glossary?term=SAML">SAML</Tooltip> 接続で追加の設定が必要になる場合があります。

1. [Auth0 Dashboard > Authentication > Enterprise > SAML](https://manage.auth0.com/#/connections/enterprise/samlp) に移動し、対象の接続を選択します。
2. **Enable Sign Out** をオンにします。
3. SAML IdP から提供された SAML Logout URL を **Sign Out URL** フィールドに入力します。このフィールドを空欄のままにすると、Auth0 は既定で **Sign In URL** フィールドの URL を使用します。
4. **Protocol Binding** フィールドの値が、SAML IdP で想定されているプロトコルバインディングと一致していることを確認します。

<div id="configure-slo-when-auth0-is-the-saml-idp">
  ## Auth0 が SAML IdP の場合の SLO 設定
</div>

Auth0 が SAML IdP の場合、考慮すべきログアウトのシナリオは 2 つあります。

* アプリケーション起点
* IdP 起点

どちらのシナリオでも、ログアウト応答の送信先を指定するために、[SAML2 Web App アドオンを設定](/docs/ja-jp/authenticate/protocols/saml/saml-sso-integrations/enable-saml2-web-app-addon)する必要があります。

1. [Auth0 Dashboard > アプリケーション > アプリケーション](https://manage.auth0.com/#/applications) に移動し、対象のアプリケーションを選択します。
2. **Addons** タブを開き、**SAML2 Web App** を選択します。
3. **Settings** タブを開きます。
4. **Settings** ボックスを見つけて、次のプロパティを含む `logout` オブジェクトを追加または更新します。

   * `callback`: アプリケーションの SLO URL を入力します。
   * `slo_enabled`: ユーザーが Auth0 SAML IdP からログアウトした際に、Auth0 からアプリケーションへ SAML ログアウトリクエストを送信する IdP 起点の SLO を有効にする場合は、`true` を入力します。そうでない場合は、`false` を入力します。

     ```bash cURL lines theme={null}
     {
       "logout": {
         "callback": "https://myapp.exampleco.com/saml/logout",
         "slo_enabled": true
       }
     }
     ```

デフォルトでは、Auth0 は `HTTP-POST` プロトコルバインディングを使用して SAML ログアウト応答を送信します。アプリケーションが `HTTP-Redirect` プロトコルバインディングを想定している場合は、次のように `binding` プロパティを追加または更新します。

```json JSON lines theme={null}
{
  "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
}
```

<div id="application-initiated-logout">
  ### アプリケーション起点のログアウト
</div>

ユーザーがアプリケーションからログアウトを開始した場合、SLO をトリガーするために、Authentication API の [SAML Logout endpoint](https://auth0.com/docs/api/authentication#saml-logout) にリクエストを送信する必要があります。

アプリケーションが SLO に対応していなくても、ログアウト後のリダイレクト URL をサポートしている場合は、そのリダイレクト URL を Authentication API の [OIDC Logout endpoint](https://auth0.com/docs/api/authentication#oidc-logout) に設定してください (従来の logout を使用している場合は、Authentication API の [Auth0 Logout endpoint](https://auth0.com/docs/api/authentication#auth0-logout) に設定してください) 。Auth0 はログアウトが開始されたことをほかのセッション参加者に通知しませんが、ユーザーの [Auth0 セッション](/docs/ja-jp/manage-users/sessions/session-layers) は削除されます。

<div id="idp-initiated-logout">
  ### IdP 起点 ログアウト
</div>

ユーザーが Auth0 SAML IdP からログアウトを開始すると、Auth0 は SAML2 Web App アドオンの Settings にある `logout.callback` プロパティで指定された URL に、SAML ログアウトレスポンスを送信します。このプロパティに指定できる URL は 1 つだけです。

この制約があるため、Auth0 SAML IdP に接続された複数のアプリケーションからユーザーをサインアウトさせる必要があるシナリオは、Auth0 ではネイティブにはサポートされていません。

SLO に近い動作は、ユーザーの Auth0 セッションの状態をアプリケーションが定期的に確認し、それに応じてアプリケーションセッションを終了するよう設定することで実現できます。詳しくは、[Session Lifetime Limits](/docs/ja-jp/manage-users/sessions/session-lifetime-limits) をご覧ください。

<div id="learn-more">
  ## 詳しくはこちら
</div>

* [アプリケーションからユーザーをログアウトする](/docs/ja-jp/authenticate/login/logout/log-users-out-of-applications)
* [OIDC エンドポイントで Auth0 からユーザーをログアウトする](/docs/ja-jp/authenticate/login/logout/log-users-out-of-auth0)
* [IDプロバイダーからユーザーをログアウトする](/docs/ja-jp/authenticate/login/logout/log-users-out-of-idps)
* [代替ログアウトでユーザーをリダイレクトする](/docs/ja-jp/authenticate/login/logout/redirect-users-after-logout)
