> 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/fr/gestion-des-certificats/api-certificates/self-service-enrollment.md).

# Enrôlement en libre-service

{% hint style="info" %}
Applicable à la version 2.9 de SCEPman et versions ultérieures
{% endhint %}

Pour que les clients puissent enrôler des certificats pour eux-mêmes sans SCEP, ils peuvent utiliser l’API REST de SCEPman. Cependant, ils ne doivent pas pouvoir enrôler n’importe quel certificat, seulement des certificats liés à leur propre identité. Par conséquent, l’API SCEPman dispose d’un rôle qui peut être attribué aux utilisateurs/groupes pour permettre cela.

## Prérequis

* Ce rôle est inclus à partir de SCEPman 2.9. Si vous avez installé SCEPman avant cela, vous devez exécuter le [script d’installation](/fr/deploiement-scepman/permissions/post-installation-config.md#running-the-scepman-installation-cmdlet) de nouveau pour que ce rôle apparaisse.

## Attribution des autorisations Self Service

Vous pouvez vérifier que le rôle Self Service existe dans l’enregistrement d’application SCEPman-api :

<figure><img src="https://129332256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FNKRfCaiolQQRMoVZ4KIu%2Fimage.png?alt=media&amp;token=0237fecc-2935-47a5-8e06-39cb7ca2b772" alt=""><figcaption></figcaption></figure>

Vous pouvez créer des assignations de rôles pour les utilisateurs et les groupes dans l’application d’entreprise SCEPman-api.

<figure><img src="https://129332256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FsTrrI2sHpugkm3U5fx6v%2Fimage.png?alt=media&amp;token=23f31d76-bc00-418d-92c9-77274dddc286" alt=""><figcaption></figcaption></figure>

## Demandes d’enrôlement de certificats

Un utilisateur disposant du rôle d’auto-service ne peut enrôler des certificats qu’avec les attributs suivants. (Ce sont les mêmes attributs que vous sélectionneriez lors de l’enrôlement de certificats via un profil SCEP dans [Intune ](/fr/gestion-des-certificats/microsoft-intune.md)par exemple). La validité du certificat sera liée à l’objet appareil dans Intune ou Entra ID, ou à l’objet utilisateur dans Entra ID, de manière analogue aux certificats enrôlés dans Intune.

{% hint style="info" %}
Si vous utilisez le script d’enrôlement préfourni de notre [Section Cas d’utilisation](/fr/use-cases.md), il générera automatiquement une requête conforme à ces exigences.
{% endhint %}

### Certificats d'appareil

Soit le Nom alternatif du sujet (SAN) doit inclure `IntuneDeviceID://<IntuneDeviceId>` en tant qu’URI, où `<IntuneDeviceId>` sans les accolades est l’ID de l’appareil dans Intune. Ou le champ CN du sujet doit être l’ID de l’appareil Entra ID ou l’ID de l’appareil Intune.

<table><thead><tr><th width="223">Champ</th><th>Valeur</th></tr></thead><tbody><tr><td>Sujet</td><td><code>CN=&#x3C;AAD_Device_Id></code> ou <code>CN=&#x3C;DeviceId></code>, où l’appareil appartient à l’utilisateur.</td></tr><tr><td>SAN (URI)</td><td><code>IntuneDeviceId://&#x3C;IntuneDeviceId></code></td></tr><tr><td>Contraintes de base</td><td><code>Type du sujet=Entité finale</code></td></tr><tr><td>Usages étendus de la clé</td><td><code>Client Authentication, 1.3.6.1.5.5.7.3.2</code></td></tr></tbody></table>

### Certificats utilisateur

<table><thead><tr><th width="221">Champ</th><th>Valeur</th></tr></thead><tbody><tr><td>Sujet</td><td><code>CN=&#x3C;DisplayName></code></td></tr><tr><td>SAN (Autre nom/UPN)</td><td><code>&#x3C;UserPrincipalName></code></td></tr><tr><td>Contraintes de base</td><td><code>Type du sujet=Entité finale</code></td></tr><tr><td>Usages étendus de la clé</td><td><code>Client Authentication, 1.3.6.1.5.5.7.3.2</code></td></tr></tbody></table>


---

# 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/fr/gestion-des-certificats/api-certificates/self-service-enrollment.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.
