> 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/commandes-powershell/set-psuauthenticationmethod.md).

# Set-PSUAuthenticationMethod

Set-PSUAuthenticationMethod configure les paramètres d'authentification dans PowerShell Universal, y compris SAML2, OpenID Connect et d'autres types de fournisseurs.

## SYNOPSIS

Configure une méthode d'authentification.

## SYNTAXE

```powershell
Set-PSUAuthenticationMethod [-Type <AuthenticationMethodType>] [-ScriptBlock <ScriptBlock>] [-Disabled] [-Configure <ScriptBlock>] [<ConnectionOptions>] [<CommonParameters>]
Set-PSUAuthenticationMethod -CallbackPath <String> [-MetadataAddress <String>] [-SigningKey <String>] [-EntityId <String>] [-IdentityProviderEntityId <String>] [-ServiceCertificate <String>] [-SingleSignOnServiceUrl <String>] [-AllowUnsolicitedAuthnResponse] [-NameIdPolicy <String>] [-LoadMetadata] [<CommonOptions>]
Set-PSUAuthenticationMethod -CallbackPath <String> -ClientId <String> [-ClientSecret <String>] [-ClientCertificate <String>] [-ClientCertificatePassword <String>] [-Resource <String>] [-Authority <String>] [-ResponseType <String>] [-SaveTokens <Boolean>] [-UseTokenLifetime <Boolean>] [-RequireMfa] [-GetClaimsFromUserInfoEndpoint <Boolean>] [-Scopes <String>] [-CorrelationCookieSameSite <String>] [<CommonOptions>]
Set-PSUAuthenticationMethod -CallbackPath <String> -Wtrealm <String> -Wreply <String> -MetadataAddress <String> [-UseTokenLifetime <Boolean>] [-CorrelationCookieSameSite <String>] [<CommonOptions>]
Set-PSUAuthenticationMethod [-LogoutUrl <String>] [<CommonOptions>]
Set-PSUAuthenticationMethod [-Native] [-Domain <String>] [<CommonOptions>]
```

`<CommonOptions>`: `[-Type <AuthenticationMethodType>] [-ScriptBlock <ScriptBlock>] [-Disabled] [-Configure <ScriptBlock>] [<ConnectionOptions>] [<CommonParameters>]`. `<ConnectionOptions>`: `[-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]`. Les jeux de paramètres ci-dessus couvrent respectivement les options génériques, SAML2, OIDC, WS-Federation, de déconnexion et de formulaire. Définissez `-Type` sur le fournisseur voulu ; les noms de son énumération comprennent `Form`, `Windows`, `Certificate`, `OpenIDConnect`, `WSFederation`, `Saml2`, `Basic` et `Devolutions`.

## DESCRIPTION

Crée une configuration de méthode d'authentification ; la commande est aussi aliasée comme `New-PSUAuthenticationMethod`. Les options de formulaire comprennent `-Native` et `-Domain` ; les options propres au fournisseur configurent OpenID Connect, SAML2 et WS-Federation. Pour OpenID Connect, `-ClientCertificate` et `-ClientCertificatePassword` configurent l'authentification client par certificat à la place ou en plus d'un secret client. N'incluez pas de secrets réels dans les exemples de documentation.

## EXEMPLE

```powershell
Set-PSUAuthenticationMethod -Type OpenIDConnect -CallbackPath '/signin-oidc' -ClientId 'psu' -Authority 'https://identity.example.com' -ClientCertificate 'C:\certs\psu.pfx' -ClientCertificatePassword $env:PSU_OIDC_CERT_PASSWORD
```

## PARAMÈTRES

| Paramètre                        | Description                                                                                                                                                          |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-Type`                          | Énumération du fournisseur : `Form`, `Windows`, `Certificate`, `OpenIDConnect`, `WSFederation`, `Saml2`, `Basic` ou `Devolutions` ; la valeur par défaut est `Form`. |
| `-ScriptBlock`                   | Script d'authentification enregistré avec la méthode.                                                                                                                |
| `-Disabled`                      | Désactive la méthode.                                                                                                                                                |
| `-Configure`                     | Bloc de script de configuration supplémentaire du fournisseur.                                                                                                       |
| `-CallbackPath`                  | Chemin d'URL de rappel ; obligatoire pour les jeux de paramètres SAML2, OIDC et WS-Federation.                                                                       |
| `-ClientId`                      | ID client OpenID Connect (obligatoire pour OIDC).                                                                                                                    |
| `-ClientSecret`                  | Secret client OpenID Connect.                                                                                                                                        |
| `-ClientCertificate`             | Paramètre de certificat client OpenID Connect.                                                                                                                       |
| `-ClientCertificatePassword`     | Mot de passe du certificat client OIDC.                                                                                                                              |
| `-Resource`                      | Identificateur de ressource OIDC.                                                                                                                                    |
| `-Authority`                     | URL d'autorité OIDC.                                                                                                                                                 |
| `-ResponseType`                  | Type de réponse OIDC (par défaut `code`).                                                                                                                            |
| `-SaveTokens`                    | Indique si les jetons OIDC sont enregistrés.                                                                                                                         |
| `-UseTokenLifetime`              | Indique s'il faut utiliser la durée de vie du jeton (OIDC ou WS-Federation).                                                                                         |
| `-RequireMfa`                    | Requiert l'authentification multifacteur pour OIDC.                                                                                                                  |
| `-GetClaimsFromUserInfoEndpoint` | Récupère les revendications OIDC à partir du point de terminaison d'informations utilisateur.                                                                        |
| `-Scopes`                        | Portées OIDC (par défaut `openid profile groups`).                                                                                                                   |
| `-CorrelationCookieSameSite`     | Paramètre SameSite du témoin de corrélation OIDC ou WS-Federation.                                                                                                   |
| `-LogoutUrl`                     | URL de déconnexion.                                                                                                                                                  |
| `-Wtrealm`                       | Domaine WS-Federation (obligatoire pour WS-Federation).                                                                                                              |
| `-Wreply`                        | URL de réponse WS-Federation (obligatoire pour WS-Federation).                                                                                                       |
| `-MetadataAddress`               | URL de métadonnées du fournisseur (obligatoire pour WS-Federation ; alias `-MetadataUrl`).                                                                           |
| `-SigningKey`                    | Clé de signature SAML2.                                                                                                                                              |
| `-EntityId`                      | ID d'entité du fournisseur de services SAML2.                                                                                                                        |
| `-IdentityProviderEntityId`      | ID d'entité du fournisseur d'identité SAML2.                                                                                                                         |
| `-ServiceCertificate`            | Certificat de service SAML2.                                                                                                                                         |
| `-SingleSignOnServiceUrl`        | URL du service d'ouverture de session SAML2.                                                                                                                         |
| `-AllowUnsolicitedAuthnResponse` | Autorise les réponses d'authentification SAML2 non sollicitées.                                                                                                      |
| `-NameIdPolicy`                  | Stratégie d'ID de nom SAML2 : `undefined`, `persistent` ou `transient`.                                                                                              |
| `-LoadMetadata`                  | Charge les métadonnées du fournisseur SAML2.                                                                                                                         |
| `-Native`                        | Active l'authentification par formulaire natif.                                                                                                                      |
| `-Domain`                        | Domaine pour l'authentification par formulaire.                                                                                                                      |
| `-ComputerName`                  | URL ou nom d'hôte de l'API de gestion PSU (alias `-Uri`).                                                                                                            |
| `-AppToken`                      | Jeton d'application de l'API de gestion.                                                                                                                             |
| `-Credential`                    | Identifiants de l'API de gestion.                                                                                                                                    |
| `-UseDefaultCredentials`         | Utilise les identifiants Windows actuels.                                                                                                                            |
| `-Integrated`                    | Utilise le client de gestion dans le processus.                                                                                                                      |
| `-TrustCertificate`              | Ignore les erreurs de validation du certificat.                                                                                                                      |
| `-Cookies`                       | Réutilise les témoins d'authentification de la session.                                                                                                              |

## PERMISSIONS

Le jeton d'accès requiert `security.authentication/update` pour exécuter cette applet de commande à distance.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/fr/commandes-powershell/set-psuauthenticationmethod.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
