> 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 %}

### Custom Domain

SCEPman で正常に認証するには、A レコードを使用するカスタム ドメインが `A レコード` App Service を指している必要があります。そうでないと、クライアントはドメイン コントローラーから有効な Kerberos チケットを要求できません。

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

次の既知の問題を参照してください: [WS\_E\_ENDPOINT\_ACCESS\_DENIED](/ja/zheng-ming-shu-guan-li/active-directory/general-configuration.md#ws_e_endpoint_access_denied) 詳細については。
{% endhint %}

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

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

{% step %}

### BaseUrl

正常に認証できるようにするには、次のことを確認してください: [AppConfig:BaseUrl](/ja/scepman-gou-cheng/application-settings/basics.md#appconfig-baseurl) 変数がカスタム ドメインと一致していること。

| 設定                | Value                  |
| ----------------- | ---------------------- |
| AppConfig:BaseUrl | 例: scepman.contoso.com |

**あるいは**、他の SCEPman エンドポイントとは異なる URL で AD エンドポイントにアクセスしたい場合は、専用の [AppConfig:ActiveDirectory:BaseUrl](/ja/scepman-gou-cheng/application-settings/active-directory/general.md#appconfig-activedirectory-baseurl) 設定を使用してください。

| 設定                                | Value                     |
| --------------------------------- | ------------------------- |
| AppConfig:ActiveDirectory:BaseUrl | 例: adendpoint.contoso.com |
| {% endstep %}                     |                           |

{% step %}

### Service Principal を作成

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

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

OU 自体に対して:

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

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

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

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

{% hint style="info" %}
ドメイン コントローラーにアクセスできるコンピューターにネットワーク アクセスがない場合でも動作する Cmdlet のバリアントがありますが、SCEPman CA 証明書のダウンロードや、Cmdlet を実行するマシンへの CA のコピーなど、追加の準備が必要です。
{% 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=local` 組織単位。
2. 手順 5 で keytab を暗号化するために、SCEPman の CA 証明書をダウンロードします。
3. コンピューター オブジェクトに service principal name (SPN) を追加します。
4. コンピューターのパスワードに基づく暗号化キーを含む、コンピューター アカウント用の keytab を作成します。
5. SCEPman の CA 証明書で keytab を暗号化し、CA の秘密鍵を使って SCEPman だけが再度復号できるようにします。
6. 暗号化された keytab を出力し、SCEPman の構成に転送できるようにします。

Base64 エンコードされた出力を、次の環境変数に追加する必要があります: **AppConfig:ActiveDirectory:Keytab** SCEPman App Service に設定します。
{% endstep %}

{% step %}

### SCEPman に Keytab を追加

次の環境変数を SCEPman App Service に追加することで、統合を簡単に有効化できます: **SCEPman App Service。** ユースケースに応じて、利用可能な証明書テンプレートを 1 つ以上有効にしてください:

*すべての証明書テンプレートを有効にした例:*

| 設定                                                                                                                                                               | Value                                                                               |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [AppConfig:ActiveDirectory:Keytab](appconfig:ActiveDirectory:Keytab)                                                                                             | 次で作成した Service Principal 用の Base64 エンコード済み keytab [手順 3](#create-service-principal) |
| [AppConfig:ActiveDirectory:Computer:Enabled](/ja/scepman-gou-cheng/application-settings/active-directory/computer-template.md#appconfig-activedirectory-enabled) | true                                                                                |
| [AppConfig:ActiveDirectory:User:Enabled](/ja/scepman-gou-cheng/application-settings/active-directory/user-template.md#appconfig-activedirectory-enabled)         | true                                                                                |
| [AppConfig:ActiveDirectory:DC:Enabled](/ja/scepman-gou-cheng/application-settings/active-directory/dc-template.md#appconfig-activedirectory-enabled)             | true                                                                                |
| [AppConfig:ActiveDirectory:RdpServer:Enabled](/ja/scepman-gou-cheng/application-settings/active-directory/rdp-template.md#appconfig-activedirectory-enabled)     | true                                                                                |
| {% endstep %}                                                                                                                                                    |                                                                                     |
| {% endstepper %}                                                                                                                                                 |                                                                                     |

## 既知の問題

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

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

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

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

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

App Service にカスタム ドメインを追加し、 `A レコード` DNS プロバイダー内でそれを使用して、App Service を指すようにします。 `CNAME`.

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

### ERROR\_INVALID\_PARAMETER

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

CEP サーバーの登録中に、次で始まる URI を入力するとこのエラーが発生します: `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, and the optional `goal` query parameter:

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