> For the complete documentation index, see [llms.txt](https://manual.dxable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.dxable.com/optimizely/platform/opti-id/install-and-set-up/install-opti-id-for-cms.md).

# Opti ID をインストールする

Visual Studio の NuGet パッケージ マネージャーまたはコマンド ラインを使用して、次の NuGet パッケージをソリューションにインストールします。

dotnet add package EPiServer.OptimizelyIdentity

Startup.csのConfigureServicesメソッドで、次のように Opti ID を有効にします。

services.AddOptimizelyIdentity(useAsDefault: true);

Opti ID は、デフォルトではシェル モジュール、プレビュー、編集モードでのみ有効になります。 UseAsDefault は、アプリケーション全体で Opti ID をグローバルに有効にします。 どの認証スキームがアクティブであるかをより詳細に制御する必要がある場合は、 AuthenticationOptionsを構成できます。 構成中にスキーム名を参照する必要がある場合、ネームスペースEPiServer.OptimizelyIdentity.OptimizelyIdentityDefaultsには定数が含まれています。

ASP.NET Identity が使用されていない場合は、 services.AddCmsAspNetIdentity\<TUser>()への呼び出しをすべて削除します。

注記

Opti ID は、仮想ロール**CmsEditors**および**CmsAdmins を自動的にマップします**。 これらのマッピングが既にある場合は、削除する必要があります。

/ui/cms/からアクセスできます。

### Opti ID をローカルで実行する <a href="#id-30j0zll" id="id-30j0zll"></a>

[https://localhost:5000でローカルに使用できます。](https://manual.dxable.com/optimizely/platform/opti-id/install-and-set-up/https:/localhost:5000でローカルに使用できます。) これを機能させるには、以下の設定も必要です。これらの設定は、 **\[開発者ポータル] > \[API] > \[Opti ID dev key]**&#x306B;あります。 これらの設定は、アプリケーションが Optimizely Digital Experience Platform (DXP) にデプロイされるときに自動的に提供されます。

appsettings.jsonに次のコードを追加して、Opti ID をローカルで実行します。

{

"EPiServer": {

"Cms": {

"OptimizelyIdentity": {

"InstanceId": "xxx",

"ClientId": "xxx",

"ClientSecret": "xxx"

}

}

}

}

### Microsoft Entra ID を使用したシングル サインオンの構成 <a href="#id-1fob9te" id="id-1fob9te"></a>

(オプション) 各記事の手順を読んで完了し、Opti ID を Microsoft Entra ID と適切に統合します。

1. Opti ID 組織でシングル サインオン (SSO) を構成する
   * [SAML を使用して Opti ID で SSO を構成する](https://support.optimizely.com/hc/en-us/articles/18129917620109)
   * [OIDC を使用して Opti ID で SSO を構成する](https://support.optimizely.com/hc/en-us/articles/18129890210573)
2. [Opti ID 組織でドメイン ネーム システム (DNS) ドメインを構成する](https://support.optimizely.com/hc/en-us/articles/18229357390221-Set-up-organizational-domains)
3. [Microsoft Entra ID と Opti ID 間のグループ同期を構成する](https://support.optimizely.com/hc/en-us/articles/17917477783181-Synchronize-groups-with-your-SSO-provider)
4. [Opti ID 管理センターでグループ、ロール、ユーザーを設定する](https://support.optimizely.com/hc/en-us/sections/19114345890317-Administer)

[グループ同期設定](https://support.optimizely.com/hc/en-us/articles/17917477783181-Synchronize-groups-with-your-SSO-provider)に従って、Entra ID および Opti ID で定義したグループのリストを正確に使用してグループ要求を確立する必要があります。 グループ メンバーシップが適切に同期されるように、Entra ID と Opti ID のグループ名が一致する必要があります。

Entra ID で、グループが登録済みの Optimizely コンテンツ管理システム (CMS) アプリケーションに割り当てられていることを確認します。 Opti ID では、グループが、グループに属するユーザーの製品権限と CMS ロールを定義する必要があります。

すべてが適切に設定された後、Opti ID を介してログインしているユーザーが CMS 製品インスタンスに切り替えると、CMS は、そのユーザーと CMS 製品インスタンスを含む Opti ID グループ内のユーザーに割り当てられたロールを読み取り、それに応じて CMS 機能を有効にします。


---

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

```
GET https://manual.dxable.com/optimizely/platform/opti-id/install-and-set-up/install-opti-id-for-cms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
