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

# Set-PSUAuthenticationMethod

Set-PSUAuthenticationMethod konfiguriert Authentifizierungseinstellungen in PowerShell Universal, einschließlich SAML2, OpenID Connect und anderer Anbietertypen.

## SYNOPSIS

Konfiguriert eine Authentifizierungsmethode.

## SYNTAX

```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]`. Die Parametersätze oben decken jeweils generische Optionen, SAML2, OIDC, WS-Federation, Abmeldung und Formularoptionen ab. Setzen Sie `-Type` auf den gewünschten Anbieter; seine Enumerationsnamen umfassen `Form`, `Windows`, `Certificate`, `OpenIDConnect`, `WSFederation`, `Saml2`, `Basic` und `Devolutions`.

## BESCHREIBUNG

Erstellt eine Konfiguration einer Authentifizierungsmethode; der Befehl ist auch als `New-PSUAuthenticationMethod` verfügbar. Formularoptionen umfassen `-Native` und `-Domain`; anbieterspezifische Optionen konfigurieren OpenID Connect, SAML2 und WS-Federation. Für OpenID Connect konfigurieren `-ClientCertificate` und `-ClientCertificatePassword` die zertifikatbasierte Clientauthentifizierung anstelle eines oder zusammen mit einem Clientgeheimnis. Nehmen Sie keine echten Geheimnisse in Dokumentationsbeispiele auf.

## BEISPIEL

```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
```

## PARAMETER

| Parameter                        | Beschreibung                                                                                                                                       |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-Type`                          | Anbieterenumeration: `Form`, `Windows`, `Certificate`, `OpenIDConnect`, `WSFederation`, `Saml2`, `Basic` oder `Devolutions`; standardmäßig `Form`. |
| `-ScriptBlock`                   | Mit der Methode gespeichertes Authentifizierungsskript.                                                                                            |
| `-Disabled`                      | Deaktiviert die Methode.                                                                                                                           |
| `-Configure`                     | Zusätzlicher Skriptblock für die Anbieterkonfiguration.                                                                                            |
| `-CallbackPath`                  | Rückruf-URL-Pfad; erforderlich für die Parametersätze SAML2, OIDC und WS-Federation.                                                               |
| `-ClientId`                      | OpenID Connect-Client-ID (für OIDC erforderlich).                                                                                                  |
| `-ClientSecret`                  | OpenID Connect-Clientgeheimnis.                                                                                                                    |
| `-ClientCertificate`             | Einstellung für das OpenID Connect-Clientzertifikat.                                                                                               |
| `-ClientCertificatePassword`     | Kennwort für das OIDC-Clientzertifikat.                                                                                                            |
| `-Resource`                      | OIDC-Ressourcenkennung.                                                                                                                            |
| `-Authority`                     | OIDC-Autoritäts-URL.                                                                                                                               |
| `-ResponseType`                  | OIDC-Antworttyp (standardmäßig `code`).                                                                                                            |
| `-SaveTokens`                    | Gibt an, ob OIDC-Token gespeichert werden.                                                                                                         |
| `-UseTokenLifetime`              | Gibt an, ob die Tokenlebensdauer verwendet wird (OIDC oder WS-Federation).                                                                         |
| `-RequireMfa`                    | Erfordert MFA für OIDC.                                                                                                                            |
| `-GetClaimsFromUserInfoEndpoint` | Ruft OIDC-Ansprüche vom Benutzerinformationsendpunkt ab.                                                                                           |
| `-Scopes`                        | OIDC-Bereiche (standardmäßig `openid profile groups`).                                                                                             |
| `-CorrelationCookieSameSite`     | SameSite-Einstellung für das OIDC- oder WS-Federation-Korrelationscookie.                                                                          |
| `-LogoutUrl`                     | Abmelde-URL.                                                                                                                                       |
| `-Wtrealm`                       | WS-Federation-Bereich (für WS-Federation erforderlich).                                                                                            |
| `-Wreply`                        | WS-Federation-Antwort-URL (für WS-Federation erforderlich).                                                                                        |
| `-MetadataAddress`               | Metadaten-URL des Anbieters (für WS-Federation erforderlich; Alias `-MetadataUrl`).                                                                |
| `-SigningKey`                    | SAML2-Signaturschlüssel.                                                                                                                           |
| `-EntityId`                      | Entitäts-ID des SAML2-Dienstanbieters.                                                                                                             |
| `-IdentityProviderEntityId`      | Entitäts-ID des SAML2-Identitätsanbieters.                                                                                                         |
| `-ServiceCertificate`            | SAML2-Dienstzertifikat.                                                                                                                            |
| `-SingleSignOnServiceUrl`        | URL des SAML2-Anmeldediensts.                                                                                                                      |
| `-AllowUnsolicitedAuthnResponse` | Nicht angeforderte SAML2-Authentifizierungsantworten zulassen.                                                                                     |
| `-NameIdPolicy`                  | SAML2-Namens-ID-Richtlinie: `undefined`, `persistent` oder `transient`.                                                                            |
| `-LoadMetadata`                  | Lädt die Metadaten des SAML2-Anbieters.                                                                                                            |
| `-Native`                        | Aktiviert die native Formularauthentifizierung.                                                                                                    |
| `-Domain`                        | Domäne für die Formularauthentifizierung.                                                                                                          |
| `-ComputerName`                  | URL oder Hostname der PSU-Verwaltungs-API (Alias `-Uri`).                                                                                          |
| `-AppToken`                      | App-Token der Verwaltungs-API.                                                                                                                     |
| `-Credential`                    | Anmeldeinformationen der Verwaltungs-API.                                                                                                          |
| `-UseDefaultCredentials`         | Verwendet die aktuellen Windows-Anmeldeinformationen.                                                                                              |
| `-Integrated`                    | Verwendet den prozessinternen Verwaltungsclient.                                                                                                   |
| `-TrustCertificate`              | Ignoriert Fehler bei der Zertifikatsvalidierung.                                                                                                   |
| `-Cookies`                       | Verwendet die Authentifizierungscookies der Sitzung erneut.                                                                                        |

## BERECHTIGUNGEN

Das Zugriffstoken erfordert `security.authentication/update`, um dieses Cmdlet remote auszuführen.


---

# 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/de/powershell-befehle/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.
