> ## 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.

> Auth0 を IDプロバイダーとして使用するように WS-Fed アプリケーションを設定する方法について説明します。

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

<Tooltip tip="Web Service Federation（WS-Fed）：ドメイン間でユーザーのアイデンティティを管理するためのプロトコル。" cta="用語集を見る" href="/ja/docs/glossary?term=WS-Fed">WS-Fed</Tooltip> アプリケーション (サービスプロバイダー) で、Auth0 を <Tooltip tip="Web Service Federation（WS-Fed）：ドメイン間でユーザーのアイデンティティを管理するためのプロトコル。" cta="用語集を見る" href="/ja/docs/glossary?term=identity+provider">IDプロバイダー</Tooltip> として使用するよう設定できます。よく使用される一部の WS-Fed アプリケーションは Auth0 で事前設定されており、[シングルサインオン統合](/ja/docs/customize/integrations/sso-integrations) から利用できます。WS-Fed アプリケーションが <Tooltip tip="Identity Provider（IdP）：デジタルアイデンティティを保存および管理するサービス。" cta="用語集を見る" href="/ja/docs/glossary?term=Single+Sign-On">シングルサインオン</Tooltip> 統合に表示されていない場合は、次の手順で WS-Fed アプリケーションの設定にアクセスできます。

1. **Dashboard >** **Applications > Applications** に移動します。
2. **Create App** をクリックします。
3. 名前を入力し、**Save** をクリックします。
4. **アドオン** タブに移動します。

   <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
     1 つのクライアントで SAML アドオンと WS-Fed アドオンの両方を有効にすることはサポートされておらず、動作に不整合が生じる可能性があります。アドオンごとに別のクライアントを使用してください。
   </Callout>
5. **WS-Fed Web App** までスクロールし、**Application Callback URL** を入力します。これは、WS-Fed 応答の POST 先となる WS-Fed アプリケーションの callback URL です。一部のアプリケーションでは、**ACS** または **Assertion Consumer Service URL** とも呼ばれます。
6. **Realm** を入力します。これは WS-Fed アプリケーションから送信される識別子で、応答内でアプリケーションを識別するために使用されます。

<div id="configure-claims-included-in-the-ws-fed-token-response">
  ## WS-Fed トークン応答に含めるクレームを設定する
</div>

<Tooltip tip="Security Assertion Markup Language (SAML): パスワードを使わずに 2 者間で認証情報をやり取りするための標準化されたプロトコル。" cta="用語集を表示" href="/ja/docs/glossary?term=SAML">SAML</Tooltip> Web App アドオンとは異なり、WS-Fed Web App アドオンには、Auth0 が生成するトークンを設定するための構成オプションはありません。既定の設定を変更する必要がある場合は、次のような post-login Action を作成できます。

```javascript lines expandable theme={null}
exports.onExecutePostLogin = async (event, api) => {

  // WS-Fedアプリケーションにのみ変更を適用する
  if (event.client.name !== 'Your ws-fed application name') {
    return;
  }

  // upnクレームの作成を除外する（デフォルトはtrue）
  api.samlResponse.setCreateUpnClaim(false);

  // アイデンティティ配列を除外する（デフォルトはtrue）
  api.samlResponse.setMapIdentities(false);

  // 明示的にマッピングされていないクレームを除外する（デフォルトはtrue）
  api.samlResponse.setPassthroughClaimsWithNoMapping(false);

  // これはデフォルトのマッピングです。必要に応じて削除または変更してください。
  api.samlResponse.setAttribute('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier', event.user.user_id);
  api.samlResponse.setAttribute('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress', event.user.email || null);
  api.samlResponse.setAttribute('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name', event.user.name || null);
  api.samlResponse.setAttribute('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname', event.user.given_name || null);
  api.samlResponse.setAttribute('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname', event.user.family_name || null);
};
```

<div id="custom-domains">
  ## カスタムドメイン
</div>

WS-Fed アプリで <Tooltip tip="カスタムドメイン: 特別な、または独自の名前を持つサードパーティのドメイン。" cta="用語集を表示" href="/ja/docs/glossary?term=custom+domain">カスタムドメイン</Tooltip> を使用し、Auth0 を IdP とする場合は、Auth0 から取得した新しい IDプロバイダー メタデータでサービスプロバイダーを更新します。メタデータは次の場所から取得できます。

`https://<YOUR CUSTOM DOMAIN>/wsfed/FederationMetadata/2007-06/FederationMetadata.xml`.

<div id="encrypted-responses">
  ## 暗号化されたレスポンス
</div>

暗号化されたレスポンスが必要な場合は、SAML を使用して ADFS に接続してください。詳細は、[ADFS を SAML IDプロバイダーとして構成する](/ja/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider/configure-adfs-saml-connections) および [SAML リクエストの署名と暗号化](/ja/docs/authenticate/protocols/saml/saml-sso-integrations/sign-and-encrypt-saml-requests) を参照してください。

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

* [カスタムドメイン](/ja/docs/customize/custom-domains)
* [Auth0との統合](/ja/docs/customize/integrations)
