> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/fr/securite/enterprise-security/windows-sso.md).

# Windows SSO

L'authentification Windows, également connue sous le nom d'authentification Negotiate, utilise Kerberos ou NTLM pour authentifier les utilisateurs sans leur demander de mot de passe. Elle est principalement prise en charge dans les domaines Windows, mais peut être configurée sous Linux et Mac OS.

### appsettings.json

L'authentification Windows offre une prise en charge de l'authentification unique pour les navigateurs et les environnements qui la supportent. Pour activer l'authentification Windows, définissez le paramètre `WindowsAuthentication` enabled sur true dans `appsettings.json`.

```javascript
"Windows": {
  "Enabled": "true"
},
```

### Authentication.ps1

Vous pouvez activer l'authentification Windows en ajoutant un nouveau fournisseur d'authentification dans Sécurité \ Authentification. Sélectionnez Windows et activez l'authentification.

![](/files/ctCr9Hj4LHwciVjyHmzj)

Une fois Windows défini comme authentifié, l'authentification Windows peut désormais être utilisée avec Universal. Vous devrez vous déconnecter pour utiliser l'authentification Windows.

### Authentification Windows dans IIS

Pour activer l'authentification Windows dans IIS, assurez-vous d'activer l'authentification Windows et de désactiver l'authentification anonyme.

![](/files/PfzTcF3oDHTd1i7recCG)

Dans le fichier web.config inclus avec PowerShell Universal, assurez-vous d'avoir défini `forwardWindowsAuthToken` à `true`.

```
<aspNetCore processPath="Universal.Server.exe" arguments="" forwardWindowsAuthToken="true" stdoutLogEnabled="true" stdoutLogFile=".\logs\log" hostingModel="OutOfProcess"/>
```

### Authentification Windows hors de IIS

L'authentification Windows est prise en charge hors de IIS, mais nécessite la configuration du compte exécutant le service Universal.

#### Windows

Sous Windows, vous devez installer PowerShell Universal en tant que [service Windows](/powershell-universal/fr/getting-started.md#windows). Une fois le service installé, vous devrez créer un [compte de service utilisateur](/powershell-universal/fr/config/running-as-a-service-account.md#application-service-account) et configurer le service pour qu'il s'exécute avec ce compte. Le [paramètre](/powershell-universal/fr/config/settings.md) d'authentification Windows doit être défini à true.

```javascript
"Windows": {
  "Enabled": "true"
},
```

Le compte de service doit avoir un nom de principal du service (SPN) configuré pour le compte d'ordinateur. Vous pouvez effectuer cette opération à l'aide de la commande `setspn`. Le nom d'ordinateur doit correspondre au nom complet qualifié de la machine exécutant Universal.

```
setspn -S HTTP/myservername.mydomain.com myuser
```

Pour plus d'informations, vous pouvez consulter la documentation Microsoft sur la configuration de l'authentification Windows ASP.NET Core : [Configuring a Windows machine for Windows Authentication](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth?view=aspnetcore-3.1\&tabs=visual-studio#windows-environment-configuration)

#### Linux

[Configuring a Linux or Mac OS machine for Windows Authentication](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth?view=aspnetcore-3.1\&tabs=visual-studio#linux-and-macos-environment-configuration)

### Revendications mises en cache

PowerShell Universal mettra en cache les revendications d'appartenance aux groupes lors de l'utilisation de l'authentification Windows. Les revendications sont mises en cache pour la durée du délai d'expiration de session configuré (25 minutes par défaut).

Pour effacer le cache manuellement, accédez à Sécurité \ Rôles et cliquez sur le bouton Effacer les revendications mises en cache.

## Configuration du navigateur

Selon votre environnement local, vous devrez peut-être configurer votre navigateur pour qu'il transmette correctement les informations d'identification à PowerShell Universal.

* [Google Chrome](https://chromeenterprise.google/policies/#HTTPAuthentication)
* [Microsoft Edge](https://learn.microsoft.com/en-us/deployedge/microsoft-edge-policies#http-authentication-policies)


---

# 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.devolutions.net/powershell-universal/fr/securite/enterprise-security/windows-sso.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.
