> For the complete documentation index, see [llms.txt](https://help.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.impact.com/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participant-experiences/microsite-experiences/set-up-sso-for-an-impactcom-microsite-via-jwt.md).

# JWT経由でimpact.comマイクロサイトのSSOを設定する

通常、Advocate プログラムのマイクロサイトでは、顧客アドボケイトが共有リンクや報酬の詳細にアクセスする前に、ユーザー名とパスワードで登録する必要があります。ただし、より高度な代替手段として、代わりにユーザーを認証するために [JSON Web トークン（JWT）](https://en.wikipedia.org/wiki/JSON_Web_Token) をサーバー側で生成し、URL パラメータを通じてマイクロサイトに渡します。

この方法では、参加者はマイクロサイトのログイン資格情報を持ちません。代わりに、既存のカスタマーポータルにログインしてアクセスし、その後 JWT を使用して本人を識別し、パーソナライズされたコンテンツを表示するようにマイクロサイトへリダイレクトされます。

#### 始める前に

{% hint style="warning" %}
**重要：** これは、マイクロサイトの標準の Managed Identity Service を迂回する高度な実装であり、設定には開発チームのサポートが必要です。
{% endhint %}

以下のすべてに該当する場合にのみ、この方法を使用してください：

* プログラムのマイクロサイトに参加者を自動的にログインさせ、シングルサインオン（SSO）体験をシミュレートしたい。
* JWT をサーバー側で生成できる。
* をインストールできない、またはインストールしたくない [ユニバーサル トラッキング タグ（UTT）](/brand/ja/what-would-you-like-to-learn-about/platform-features/tracking/javascript-tag-tracking/tracking-with-universal-tracking-tag-utt.md) あなたのサイトに。

{% stepper %}
{% step %}

#### ステップ 1: マネージド ID なしでマイクロサイトを作成する

マイクロサイトを作成するときは、Managed Identity Service をオフにし、すべてのページを「未確認」ユーザーがアクセスできるように設定する必要があります。 *ダッシュボード* ページでは JWT を使用してユーザーを認証し、マイクロサイトを読み込みます。

<details>

<summary>マイクロサイトを作成する</summary>

まず、設定を変更して *参加者ログイン* オプション。

1. 左側のナビゲーションメニューから、 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FGgFZ4TpepHNOLrRI2yRk%2Fimage.png?alt=media\&token=5b166f3c-f805-4aaf-b2c4-0f7e11697ec0) **\[エンゲージ]** **→ コンテンツ**.
2. 上の *マイクロサイト* カードを選択し **設定を編集**.
3. その後、新しい *マイクロサイト設定* ページを選択します。
4. 〜の中で *ログイン* セクション、 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FACIoqj1Ayhx8QzL9aqYB%2Ftoggle-off-solid%20\(1\).svg?alt=media\&token=a85366cd-4b70-41a6-83df-319f89597ede) **\[オフにする]** **参加者ログイン**.
5. 選択 **設定を保存**.

</details>

<details>

<summary>ダッシュボードページを設定する</summary>

次に、マイクロサイトの *ダッシュボード* ページを未確認ユーザーに表示されるよう設定します。次に、ページ上のコンポーネントを紹介プログラムに接続して、適切な情報が表示されるようにします。

1. サイトの *ダッシュボード* ページ設定を調整します。
   * 左側のナビゲーションメニューから、 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FGgFZ4TpepHNOLrRI2yRk%2Fimage.png?alt=media\&token=5b166f3c-f805-4aaf-b2c4-0f7e11697ec0) **\[エンゲージ]** **→ コンテンツ** → **セットアップ内容** または **コンテンツを編集**.
   * 〜から *マイクロサイト* タブで、次を選択し **ダッシュボード** 次の *ログイン済みレイアウト* セクション。
   * 選択 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FNVJihd9nYKCiCEg5tI6i%2F2a92939e8e78dd7e0c0416b1a250d5ef1d7ab0dec966fb5ed320ca62acfc06c5.svg?alt=media\&token=7cab8ce5-a26b-4057-a822-0746130d9117) **\[メニュー] → \[設定]**.
   * 〜から *許可されたユーザー* ドロップダウン リストで、 **未確認**.
2. ページ上のコンポーネントにプログラム ID を追加します。 *ダッシュボード*.
   * ユーザーステータス — 表示する各ユーザーステータスごとに ID を追加する必要があります。
   * 共有リンク
   * 紹介コード
   * ソーシャル メディア ボタン — 含める各ソーシャル メディア共有ボタンごとに ID を追加する必要があります。
3. 右上隅で、 **保存**.

   <div data-with-frame="true"><figure><img src="https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FILGfObvnj8KJZ7tCnv1N%2FScreenshot%202026-05-18%20at%2008.35.52.png?alt=media&amp;token=e25b48a9-0ec3-4410-9dc0-feb609d46d34" alt="" width="563"><figcaption></figcaption></figure></div>

エディターを使用してページやコンポーネントの設定を見つけて調整する方法については、 [マイクロサイトエディターの解説](/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participant-experiences/microsite-experiences/microsite-editor-explained.md) および [マイクロサイトのレイアウトとページをカスタマイズする](/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participant-experiences/microsite-experiences/customize-microsite-layouts-and-pages.md).

</details>

<details>

<summary>不要なページを削除する</summary>

マイクロサイトで使用しないレイアウトとページを削除します。

1. カーソルをページまたはレイアウトの上に合わせます。
2. 選択 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FMLtRUwWz0pujlfmYWOgg%2FMoreVN.svg?alt=media\&token=03a3c355-a347-4207-baf7-c44fadf6d080) **\[その他]** **→ 削除**.
3. を削除する *ログイン済みレイアウト*.
4. 次のページを削除してください：
   * プロフィールを編集
   * メール認証
   * パスワードをお忘れですか
   * ログイン
   * ログアウト
   * 登録
   * パスワードをリセット
   * メールを認証

</details>
{% endstep %}

{% step %}

#### ステップ 2: JWT を生成する

JWT の構造は、ユーザー認証のための標準的な Advocate の要件に従います。以前に Advocate を統合したことがあれば、UTT 用に同様のトークンをすでに生成している可能性があります。

JWT は、ブラウザーではなく、サーバーまたは信頼できるバックエンドシステム上で安全に生成する必要があります。

方法を見る [JWT を生成する方法とペイロード要件](https://integrations.impact.com/integration-guides/for-brands/advocate/advocate-tracking-integrations/json-web-tokens-jwts).
{% endstep %}

{% step %}

#### ステップ 3: JWT をマイクロサイトの URL に追加する

ユーザーがプラットフォームにログインしたら、URL のクエリ文字列に JWT を含めてマイクロサイトへリダイレクトします。

{% hint style="info" %}
**例:** `https://your-microsite.squatch.app/?jwt=<YOUR_GENERATED_JWT>`
{% endhint %}

マイクロサイトを新しいブラウザタブで開くことも、iframe を使用してアプリに埋め込むこともできます。マイクロサイトを埋め込む場合は、 [クロスオリジン リソース共有（CORS）](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) とブラウザーの制限を適切に処理してください。
{% endstep %}
{% endstepper %}

#### メモ

* この認証方法を使用すると、ユーザーはマイクロサイトのログイン資格情報を持ちません。
* JWT ベースのアクセスは厳密に管理する必要があります。クライアント側 JavaScript で公開したり、操作したりしないでください。
* これは標準的ではない方法です。プログラムを展開する前に、ステージング環境で十分にテストしてください。
* 必要な [サポート](mailto:saasquatch-support@impact.com)場合は、サポート依頼にマイクロサイトの URL、実装の詳細、サンプルの JWT ペイロードを含めてください。


---

# 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://help.impact.com/brand/ja/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participant-experiences/microsite-experiences/set-up-sso-for-an-impactcom-microsite-via-jwt.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.
