> 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/yi-ban-she-ding.md).

# 一般設定

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

{% stepper %}
{% step %}

### カスタム ドメイン

SCEPman での正常な認証のため、A レコードを使用するカスタム ドメインが `A レコード` App Service にポイントされていることを確認してください。そうでない場合、クライアントはドメイン コントローラーから有効な 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 %}
{% endstep %}

{% step %}

### BaseUrl

正常な認証を可能にするには、 [AppConfig:BaseUrl](https://app.gitbook.com/o/-LhPlvZ6dc8XcqY7tdZw/s/-LoGejQeUQcw7lqnQ3WX/~/diff/~/changes/806/scepman-configuration/application-settings/basics#appconfig-baseurl) 変数がカスタム ドメインと一致していることを確認してください。

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

**または**、AD エンドポイントを他の SCEPman エンドポイントとは異なる URL でアクセスしたい場合は、専用の [AppConfig:ActiveDirectory:BaseUrl](https://app.gitbook.com/o/-LhPlvZ6dc8XcqY7tdZw/s/-LoGejQeUQcw7lqnQ3WX/~/diff/~/changes/806/scepman-configuration/application-settings/active-directory/general#appconfig-activedirectory-baseurl) 設定を使用してください。

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

{% step %}

### Service Principal を作成

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

Domain Controller にアクセスできるコンピューターまたはドメイン参加済みサーバー上でこのコマンドを実行できます。さらに、 `RSAT-AD-Tools` 機能も必要です。さらに、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=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.** ユースケースに応じて、利用可能な証明書テンプレートの 1 つ以上を有効にします:

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

| 設定                                                                                                                                                             | 値                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AppConfig:ActiveDirectory:Keytab](appconfig:ActiveDirectory:Keytab)                                                                                           | 手順 3 で作成された Service Principal 用の Base64 エンコードされた keytab [手順 3](/ja/zheng-ming-shu-guan-li/active-directory/yi-ban-she-ding.md#create-service-principal) |
| [AppConfig:ActiveDirectory:Computer:Enabled](/ja/scepman-gou-cheng/application-settings/active-directory/konpyt-tenpurto.md#appconfig-activedirectory-enabled) | true                                                                                                                                                    |
| [AppConfig:ActiveDirectory:User:Enabled](/ja/scepman-gou-cheng/application-settings/active-directory/yz-tenpurto.md#appconfig-activedirectory-enabled)         | true                                                                                                                                                    |
| [AppConfig:ActiveDirectory:DC:Enabled](/ja/scepman-gou-cheng/application-settings/active-directory/dc-tenpurto.md#appconfig-activedirectory-enabled)           | true                                                                                                                                                    |
| [AppConfig:ActiveDirectory:RdpServer:Enabled](/ja/scepman-gou-cheng/application-settings/active-directory/rdp-tenpurto.md#appconfig-activedirectory-enabled)   | true                                                                                                                                                    |
| {% endstep %}                                                                                                                                                  |                                                                                                                                                         |
| {% endstepper %}                                                                                                                                               |                                                                                                                                                         |

## 既知の問題

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

```
エラー: WS_E_ENDPOINT_ACCESS_DENIED 
Hex: 0x803d0005
Dec: -2143485947
```

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

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

この `A レコード` インフラストラクチャ ホストの URI は将来一貫していることが保証されないため、このホストに 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
Hex: 0x80070057
Dec: -2147024809
```

このエラーは、CEP サーバーの登録中に、 `http://`で始まる URI を入力すると発生します。CEP サーバーの登録には必ず `https://` .

### ERROR\_ACCESS\_DENIED

```
エラー: ERROR_ACCESS_DENIED
Hex: 0x80070005
Dec: -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/yi-ban-she-ding.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.
