# セルフサービス登録

{% hint style="info" %}
SCEPman バージョン 2.9 以降に適用されます
{% endhint %}

クライアントが SCEP を使わずに自分自身の証明書を登録する場合、SCEPman REST API を使用できます。ただし、任意の証明書を登録できるべきではなく、自分の ID に紐づく証明書のみを登録できる必要があります。そのため、SCEPman API には、この機能を有効にするためにユーザー/グループに割り当てられるロールがあります。

## 前提条件

* このロールは SCEPman 2.9 以降に含まれています。これ以前に SCEPman をインストールした場合は、 [インストール スクリプト](/ja/scepman-depuroi/permissions/post-installation-config.md#running-the-scepman-installation-cmdlet) を再度実行して、このロールを表示させる必要があります。

## セルフサービス権限の割り当て

SCEPman-api のアプリ登録に Self Service ロールが存在することを確認できます:

<figure><img src="/files/f634e192190254d6ac0ed400330f35d454855ba7" alt=""><figcaption></figcaption></figure>

SCEPman-api のエンタープライズ アプリケーションで、ユーザーおよびグループに対するロール割り当てを作成できます。&#x20;

<figure><img src="/files/05d0928d1c901941f6c56bcbf48be7e2ae50608f" alt=""><figcaption></figcaption></figure>

## 証明書登録リクエスト

セルフサービス ロールを持つユーザーは、次の属性を持つ証明書のみを登録できます。（これらは、たとえば [Intune ](/ja/zheng-ming-shu-guan-li/microsoft-intune.md)の SCEP プロファイル経由で証明書を登録する際に選択する属性と同じです）。証明書の有効性は、Intune または Entra Id のデバイス オブジェクト、あるいは Entra Id のユーザー オブジェクトに紐づけられ、Intune で登録された証明書と同様になります。

{% hint style="info" %}
弊社の [ユースケース セクション](/ja/use-cases.md)から提供される登録スクリプトを使用している場合、これらの要件に従ったリクエストが自動的に生成されます。
{% endhint %}

### デバイス証明書

Subject Alternative Name (SAN) には、必ず `IntuneDeviceID://<IntuneDeviceId>` を URI として含める必要があります。ここで `<IntuneDeviceId>` は波括弧なしの Intune 上のデバイス ID です。あるいは、Subject の CN フィールドは Entra ID のデバイス ID または Intune Device Id である必要があります。

<table><thead><tr><th width="223">項目</th><th>値</th></tr></thead><tbody><tr><td>サブジェクト</td><td><code>CN=&#x3C;AAD_Device_Id></code> または <code>CN=&#x3C;DeviceId></code>。この場合のデバイスはユーザーが所有するものです。</td></tr><tr><td>SAN (URI)</td><td><code>IntuneDeviceId://&#x3C;IntuneDeviceId></code></td></tr><tr><td>基本制約</td><td><code>Subject Type=End Entity</code></td></tr><tr><td>EKU</td><td><code>クライアント認証、1.3.6.1.5.5.7.3.2</code></td></tr></tbody></table>

### ユーザー証明書

<table><thead><tr><th width="221">項目</th><th>値</th></tr></thead><tbody><tr><td>サブジェクト</td><td><code>CN=&#x3C;DisplayName></code></td></tr><tr><td>SAN (Other Name/UPN)</td><td><code>&#x3C;UserPrincipalName></code></td></tr><tr><td>基本制約</td><td><code>Subject Type=End Entity</code></td></tr><tr><td>EKU</td><td><code>クライアント認証、1.3.6.1.5.5.7.3.2</code></td></tr></tbody></table>


---

# Agent Instructions: 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/api-certificates/self-service-enrollment.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.
