> 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/es/seguridad/enterprise-security/ws-federation.md).

# WS-Federation

Configure la autenticación WS-Federation en PowerShell Universal con ADFS o Azure Active Directory, incluida la configuración del relying party trust.

{% hint style="info" %}
WS-Federation requiere una [licencia](https://store.devolutions.net/package#psu).
{% endhint %}

WS-Federation admite tanto Active Directory Federation Services como Azure Active Directory.

Primero, debe configurar ADFS o AzureAD para que admita Universal.

## Configuración de ADFS para Universal <a href="#configuring-adfs-for-universal-dashboard" id="configuring-adfs-for-universal-dashboard"></a>

### Configuración del servicio <a href="#service-settings" id="service-settings"></a>

En primer lugar, deberá recopilar las Federation Service Properties de ADFS. Abra la aplicación AD FS (Microsoft.IdentityServer.msc). A continuación, haga clic en Service y luego en Edit Federation Service Properties.

Esto abrirá un cuadro de diálogo con los valores de su servicio ADFS. Necesitará estos valores para configurar PowerShell Universal.

### Entidades de confianza <a href="#relying-parties" id="relying-parties"></a>

Si no tiene ninguna Reply Party Trust configurada, haga clic en Add Replying Party Trust. Seleccione Claims aware.

Seleccione Enter data about the relying party manually.

Especifique un nombre para la entidad de confianza.

Habilite el protocolo WS-Federation Passive. Introduzca la URL del servidor de PowerShell Universal con una barra al final.

Introduzca la URL de su servidor de PowerShell Universal.

Tras finalizar la configuración de su Replying Party Trust, deberá configurar una Claim Issuance Policy. Cree una Issuance Transform Rule que envíe al menos el Name y el Name ID a Universal.

Puede configurar claims adicionales que desee usar si utiliza políticas en Universal.

### Solución de problemas

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

Este problema puede producirse si la página IDP Initiated Sign On está deshabilitada. Este es el valor predeterminado. Ejecute el siguiente comando desde una consola administrativa.

{% code collapsedlinecount="10" %}

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

{% endcode %}

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.

## Configuración para Azure Active Directory <a href="#configuring-for-azure-active-directory" id="configuring-for-azure-active-directory"></a>

Siga la documentación para la configuración de Azure Active Directory que se encuentra en este [documento de Microsoft](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/ws-federation?view=aspnetcore-2.2#azure-active-directory).

## Configuración de Universal <a href="#configuring-universal-dashboard" id="configuring-universal-dashboard"></a>

### Usar Appsettings.json

Después de configurar ADFS o AAD, ya puede proporcionar a Universal las propiedades MetadataAddress y Wtrealm. Lea sobre esta configuración en nuestra [página de Configuración ](/powershell-universal/es/config/settings.md).

Aquí tiene un ejemplo de cómo actualizar el fichero `appsettings.json` para adaptar la configuración correcta para WS-Federation.

{% code collapsedlinecount="10" %}

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

{% endcode %}

Al ejecutar su servidor, ahora debería solicitársele sus credenciales, ya sea a través del sistema de inicio de sesión único de Internet Explorer, o bien se le redirigirá a la página de inicio de sesión de WS-Fed.

### Usar Authentication.ps1

Puede configurar la autenticación WS-Federation en la consola de administración. Para ello, vaya a Secure > Authentication. Añada el proveedor WS-Federation seleccionándolo en la lista desplegable de la parte superior derecha.

A continuación, edite las propiedades del proveedor de autenticación y especifique los detalles de configuración de su instalación de ADFS.

Una vez configurado, habilite el proveedor WS-Federation. Después, cierre la sesión y vaya a `/admin` Se le pedirá que inicie sesión en su proveedor 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, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/es/seguridad/enterprise-security/ws-federation.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.
