> 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/ws-federation.md).

# WS-Federation

{% hint style="info" %}
WS-Federation nécessite une [licence](https://ironmansoftware.com/pricing/powershell-universal).
{% endhint %}

WS-Federation prend en charge Active Directory Federation Services et Azure Active Directory.

Vous devez d'abord configurer ADFS ou AzureAD pour prendre en charge Universal.

## Configuration d'ADFS pour Universal <a href="#configuring-adfs-for-universal-dashboard" id="configuring-adfs-for-universal-dashboard"></a>

### Paramètres du service <a href="#service-settings" id="service-settings"></a>

Vous devez d'abord récupérer les propriétés du service de fédération depuis ADFS. Ouvrez l'application AD FS (Microsoft.IdentityServer.msc). Cliquez ensuite sur Service, puis sur Edit Federation Service Properties.

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

Une boîte de dialogue s'ouvre avec les valeurs de votre service ADFS. Vous aurez besoin de ces valeurs pour configurer PowerShell Universal.

![](https://gblobscdn.gitbook.com/assets%2F-L9mVQO4zbOX7ZcHvIte%2F-Lob6ow15SQRLl3vo8ZV%2F-Lob7luBvuEGUTrLIors%2Fimage.png?alt=media\&token=64c3c00f-1d2c-4346-bcc1-dd89e7cf4c24)

### Parties de confiance <a href="#relying-parties" id="relying-parties"></a>

Si aucune approbation de partie de confiance n'est configurée, cliquez sur Add Replying Party Trust. Sélectionnez Claims aware.

<figure><img src="/files/9E7013r2zXcXkkp2Tzgc" alt=""><figcaption><p>Claims Aware</p></figcaption></figure>

Sélectionnez Enter data about the relying party manually.

<figure><img src="/files/hZEPtGzoSqZWbzybNXy5" alt=""><figcaption><p>Manual Relying Party</p></figcaption></figure>

Spécifiez un nom pour la partie de confiance.

<figure><img src="/files/IuZOdO1cdk098xU89kHg" alt=""><figcaption><p>Relying Party Name</p></figcaption></figure>

Activez le protocole passif WS-Federation. Entrez l'URL du serveur PowerShell Universal avec une barre oblique finale.

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

Entrez l'URL de votre serveur PowerShell Universal.

<figure><img src="/files/Po84iLz9ODZwTnrIA7Y9" alt=""><figcaption><p>Replying Party Trust Identifier</p></figcaption></figure>

Une fois la configuration de votre approbation de partie de confiance terminée, vous devez configurer une stratégie d'émission de revendications. Créez une règle de transformation d'émission qui envoie au moins le nom (Name) et l'identifiant de nom (Name ID) à Universal.

<figure><img src="https://gblobscdn.gitbook.com/assets%2F-L9mVQO4zbOX7ZcHvIte%2F-Lob6ow15SQRLl3vo8ZV%2F-Lob92zcF4qYpWtR0g_4%2Fimage.png?alt=media&#x26;token=34dfd4db-d742-4f8b-a271-86d37542dc35" alt=""><figcaption></figcaption></figure>

Vous pouvez configurer des revendications supplémentaires à utiliser si vous employez des stratégies dans Universal.

### Résolution des problèmes

MSIS7065: There are no registered protocol handlers on path /adfs/ls to process the incoming request.

Ce problème peut survenir si la page IDP Initiated Sign On est désactivée. Il s'agit du comportement par défaut. Exécutez la commande suivante depuis une console d'administration.

```powershell
 Set-AdfsProperties -EnableIdPInitiatedSignonPage $true
```

MSIS7001: The passive protocol context was not found or not valid. If the context was stored in cookies, the cookies that were presented by the client were not valid. Ensure that the client browser is configured to accept cookies from this website and retry this request.

## Configuration pour Azure Active Directory <a href="#configuring-for-azure-active-directory" id="configuring-for-azure-active-directory"></a>

Suivez la documentation de configuration d'Azure Active Directory disponible dans ce [document Microsoft](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/ws-federation?view=aspnetcore-2.2#azure-active-directory).

## Configuration de Universal <a href="#configuring-universal-dashboard" id="configuring-universal-dashboard"></a>

### Utilisation d'Appsettings.json

Après avoir configuré ADFS ou AAD, vous pouvez fournir les propriétés à Universal pour les champs MetadataAddress et Wtrealm. Consultez ces paramètres sur notre page [Paramètres](/powershell-universal/fr/config/settings.md).

Voici un exemple de mise à jour du fichier `appsettings.json` pour appliquer les paramètres corrects pour WS-Federation.

```javascript
{
  "Kestrel": {
    "Endpoints": {
      "HTTP": {
        "Url": "http://*:5000"
      }
    },
    "RedirectToHttps": "false"
  },
  "ApplicationInsights": {
    "InstrumentationKey": ""
  },
  "Logging": {
    "Path": "%PROGRAMDATA%/PowerShellUniversal/log.txt",
    "RetainedFileCountLimit": 31,
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*",
  "CorsHosts": "",
  "Data": {
    "RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
    "ConnectionString": "%ProgramData%\\UniversalAutomation\\database.db",
    "GitRemote": "",
    "GitUserName": "",
    "GitPassword": "", 
    "ConfigurationScript": ""
  },
  "Api": {
    "Url": ""
  },
  "Authentication" : {
    "Windows": {
      "Enabled": "false"
    },
    "WSFed": {
        "Enabled": "true",
        "MetadataAddress": "https://ironman.local:443/FederationMetadata/2007-06/FederationMetadata.xml",
        "Wtrealm": "https://ironman.local:12345",
        "CallbackPath": "/auth/signin-wsfed"
    },
    "OIDC": {
      "Enabled": "false",
      "CallbackPath": "/auth/signin-oidc",
      "ClientID": "",
      "ClientSecret": "",
      "Resource": "",
      "Authority": "",
      "ResponseType": "",
      "SaveTokens": "false"
    },
    "SessionTimeout": "25"
  },
  "Jwt": {  
    "SigningKey": "PleaseUseYourOwnSigningKeyHere",  
    "Issuer": "IronmanSoftware",
    "Audience": "PowerShellUniversal"
  },
  "UniversalDashboard": {
    "AssetsFolder": "%ProgramData%\\PowerShellUniversal\\Dashboard"
  },
  "ShowDevTools": false,
  "HideAdminConsole": false
}
```

Lors du démarrage de votre serveur, vous serez invité à entrer vos informations d'identification, soit via le système d'authentification unique d'Internet Explorer, soit vous serez redirigé vers la page de connexion WS-Fed.

![](https://gblobscdn.gitbook.com/assets%2F-L9mVQO4zbOX7ZcHvIte%2F-Lob6ow15SQRLl3vo8ZV%2F-Lob9yeDdGENbUiyz4Sj%2Fimage.png?alt=media\&token=910db2dd-85f3-46eb-b3ec-9f551f244439)

### Utilisation d'Authentication.ps1

Vous pouvez configurer l'authentification WS-Federation dans la console d'administration. Pour ce faire, accédez à Security \ Authentication. Ajoutez le fournisseur WS-Federation en le sélectionnant dans la liste déroulante en haut à droite.

![](/files/Z7wmuPDN4DUwjCYRuDNp)

Modifiez ensuite les propriétés du fournisseur d'authentification et spécifiez les détails de configuration pour votre installation ADFS.

![](/files/aTX0aWsPoWNzQ1SfPsRx)

Une fois configuré, activez le fournisseur WS-Federation. Déconnectez-vous ensuite et accédez à `/admin`. Vous serez invité à vous connecter à votre fournisseur WS-Federation.


---

# 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/ws-federation.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.
