> For the complete documentation index, see [llms.txt](https://docs.scepman.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scepman.com/ja/zheng-ming-shu-guan-li/active-directory/general-configuration.md).

# 一般設定

SCEPman が受信 SOAP リクエストを正常に処理できるようにするには、いくつかの手順を行う必要があります:

{% stepper %}
{% step %}

### カスタム ドメインと BaseUrl

SCEPman で正常に認証するには、A レコードを使用するカスタム ドメインが `A レコード` App Service に向けられていることを確認してください。そうしないと、クライアントは Domain Controller から有効な Kerberos チケットの要求に失敗します。

{% hint style="info" %}
カスタム ドメインは AD ドメインの FQDN に似ている必要はありません。したがって、ドメイン `ad.contoso.local` があるからといって、SCEPman に同一または類似のカスタム ドメインが必要というわけではありません。

以下の既知の問題の説明を参照してください [WS\_E\_ENDPOINT\_ACCESS\_DENIED](https://app.gitbook.com/o/-LhPlvZ6dc8XcqY7tdZw/s/-LoGejQeUQcw7lqnQ3WX/~/diff/~/changes/806/certificate-management/active-directory/general-configuration#ws_e_endpoint_access_denied) 詳細については。
{% endhint %}

SCEPman がカスタム ドメインを使用してアクセス可能になるように構成されていることを確認してください:

{% content-ref url="/pages/8eb47ea387d89933dddb8698281a8acb2f7a1af7" %}
[カスタム ドメイン](/ja/azure-gou-cheng/custom-domain.md)
{% endcontent-ref %}

同じ要件は、証明書を登録するための初回ポリシー要求（証明書テンプレートの一覧表示）の後にも適用されます。認証を正常に行うには、 [AppConfig:BaseUrl](https://app.gitbook.com/o/-LhPlvZ6dc8XcqY7tdZw/s/-LoGejQeUQcw7lqnQ3WX/~/diff/~/changes/806/scepman-configuration/application-settings/basics#appconfig-baseurl) 変数がカスタム ドメインと一致していることを確認するか、別の URL から AD エンドポイントにアクセスしたい場合は専用の [AppConfig:ActiveDirectory:BaseUrl](https://app.gitbook.com/o/-LhPlvZ6dc8XcqY7tdZw/s/-LoGejQeUQcw7lqnQ3WX/~/diff/~/changes/806/scepman-configuration/application-settings/active-directory/general#appconfig-activedirectory-baseurl) 設定を使用してください。
{% endstep %}

{% step %}

### Service Principal の作成

使用してください `New-SCEPmanADPrincipal` SCEPman PowerShell モジュールの Cmdlet を使用して、オンプレミスの Active Directory ドメインに Service Principal を作成します。このアカウントから keytab もエクスポートし、SCEPman の CA 証明書で暗号化します。

このコマンドは、次のものがインストールされている Domain Controller またはドメイン参加済みサーバーで実行できます: `RSAT-AD-Tools` 機能。また、Service Principal を作成する OU には次の権限が必要です:

OU 自体に対して:

* コンピューター オブジェクトの作成

子孫のコンピューター オブジェクトに対して:

* パスワードのリセット
* 書き込み `msDS-SupportedEncryptionTypes`
* 書き込み `servicePrincipalName`
* 書き込み `userPrincipalName`

以下のバリアントでは、SCEPman インスタンスへの送信 HTTPS ネットワーク アクセスも必要です。

{% hint style="info" %}
Domain Controller へのアクセスがあるコンピューターにネットワーク アクセスがない場合でも、ネットワークアクセスなしで動作する CMDlet のバリアントがありますが、SCEPman CA 証明書をダウンロードして、CA を CMDlet を実行するマシンにコピーするなど、追加の準備が必要です。
{% endhint %}

```powershell
Install-Module SCEPman -Force
New-SCEPmanADPrincipal -Name "SCEPmanAD" -AppServiceUrl "scepman.contoso.com" -OU
"OU=Example,DC=contoso,DC=local"
```

このコマンドを実行すると、次の処理が行われます:

1. 次の場所にコンピューター オブジェクトを作成する `OU=Example,DC=contoso,DC=com` 組織単位。
2. 手順 5 で keytab を暗号化するために、SCEPman の CA 証明書をダウンロードします。
3. コンピューター オブジェクトに Service Principal 名 (SPN) を追加する。
4. コンピューターのパスワードに基づく暗号化キーを含む、コンピューター アカウント用の keytab を作成する。
5. CA の秘密鍵を使用して SCEPman だけが再び復号できるように、SCEPman の CA 証明書で keytab を暗号化します。
6. 暗号化された keytab を出力し、SCEPman の構成に転送できるようにする。

その後、Base64 エンコードされた出力を環境変数 **AppConfig:ActiveDirectory:Keytab** の SCEPman App Service.3
{% endstep %}

{% step %}

### SCEPman に keytab を追加する

統合は、以下の環境変数を **SCEPman App Service.** に追加することで簡単に有効化できます。

*ユースケースに応じて、使用可能な証明書テンプレートのうち 1 つ以上を有効にします:*

| 設定                                          | 値                                                    |
| ------------------------------------------- | ---------------------------------------------------- |
| AppConfig:ActiveDirectory:Keytab            | 手順 1 で作成した Service Principal の Base64 エンコード済み keytab |
| AppConfig:ActiveDirectory:Computer:Enabled  | true                                                 |
| AppConfig:ActiveDirectory:User:Enabled      | true                                                 |
| AppConfig:ActiveDirectory:DC:Enabled        | true                                                 |
| AppConfig:ActiveDirectory:RdpServer:Enabled | true                                                 |
| {% endstep %}                               |                                                      |
| {% endstepper %}                            |                                                      |

## 既知の問題

### WS\_E\_ENDPOINT\_ACCESS\_DENIED

```
エラー: WS_E_ENDPOINT_ACCESS_DENIED 
16 進: 0x803d0005
10 進: -2143485947
```

このエラーは、次を使用しているときに CEP サーバーの検証中に発生することが知られています。 *既定の* Azure App Service の URI。このエラーは、Kerberos プロトコルが、アクセス対象サービスの A レコードの Service Principal 名を要求することが原因です。既定の app service ドメインの場合、たとえば `contoso.azurewebsites.net` は単なる CNAME であり、次のような A レコードを指しています:

```
waws-prod-ab1-234-c56d.westeurope.cloudapp.azure.com
```

このインフラストラクチャ ホストの A レコードは将来一貫性が保証されないため、このホストに Service Principal 名を追加することは **推奨されません**.

アプリ サービスにカスタム ドメインを追加し、CNAME の代わりに DNS プロバイダー内の A レコードを使用してアプリ サービスを指すようにしてください。

{% content-ref url="/pages/8eb47ea387d89933dddb8698281a8acb2f7a1af7" %}
[カスタム ドメイン](/ja/azure-gou-cheng/custom-domain.md)
{% endcontent-ref %}

### ERROR\_INVALID\_PARAMETER

```
エラー: ERROR_INVALID_PARAMETER
16 進: 0x80070057
10 進: -2147024809
```

このエラーは、次で始まる URI を入力すると、CEP サーバーの登録中に発生します: `http://`. CEP サーバーの登録には必ず次を使用してください `https://`

### ERROR\_ACCESS\_DENIED

```
エラー: ERROR_ACCESS_DENIED
16 進: 0x80070005
10 進: -2147024891
```

機械コンテキストで CEP サーバーを登録する場合、実行ユーザー（ `gpmc.msc`を開始したアカウント）は、GPO の編集時にコンピューター上のローカル Administrators グループのメンバーである必要があります。

必ず開始してください `gpmc.msc` 今回は昇格された権限で。


---

# 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://docs.scepman.com/ja/zheng-ming-shu-guan-li/active-directory/general-configuration.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.
