> 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/it/sicurezza/enterprise-security/saml2.md).

# SAML2

{% hint style="info" %}
SAML2 richiede una [licenza](https://store.devolutions.net/package#psu).
{% endhint %}

PowerShell Universal può essere configurato per integrarsi con un provider di identità SAML2. Questa documentazione fornisce i dettagli per configurare PSU con un sistema di questo tipo.

## Caricamento automatico dei metadati

PowerShell Universal fornisce un meccanismo per caricare il documento dei metadati direttamente dal provider di identità SAML2 anziché fornire manualmente le opzioni di configurazione. Questo raccoglierà quante più informazioni possibili. Sarà comunque necessario fornire l'Entity ID.

Il percorso di callback verrà visualizzato nella parte superiore della finestra modale della proprietà.

<figure><img src="/files/kJ2vJ1hE8ufDXGMeyOoZ" alt=""><figcaption><p>Caricamento dei metadati</p></figcaption></figure>

## Fornire manualmente i valori

### Impostazioni del provider di identità

Sarà necessario configurare il provider di identità per l'applicazione PowerShell Universal. Sarà necessario impostare un entity ID accettabile e mappare gli attributi. PowerShell Universal richiede che l'attributo name sia mappato. Il nome dell'attributo deve essere il seguente.

```
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name
```

Dovrebbe mapparlo all'identità utente che desidera venga utilizzata all'interno di PowerShell Universal.

È possibile mappare attributi aggiuntivi che saranno disponibili durante la [valutazione dei ruoli](/powershell-universal/it/sicurezza/security.md#authorization). Di seguito troverà un esempio di configurazione di Shibboleth.

### Impostazioni dell'Entity ID

{% hint style="info" %}
[HTTPS ](/powershell-universal/it/config/hosting.md#configuring-https)è richiesto per l'autenticazione SAML2.
{% endhint %}

Sono disponibili diverse impostazioni di base che può configurare nella console di amministrazione di PowerShell Universal. Per aggiungere il supporto SAML2, faccia clic su Security \ Authentication. Nell'angolo in alto a destra, può selezionare SAML2 dal menu a discesa.

![](/files/qUI1cQUBnof3nI6bUEJu)

Una volta aggiunta l'integrazione SAML2, può configurare le impostazioni di base per la comunicazione con il provider di identità. Sarà necessario configurare almeno l'Entity ID e l'Identity Provider Entity ID.

In genere, questi entity ID sono URL configurati all'interno del provider di identità.

<figure><img src="/files/z2EZ6fFnkb1ubNWQOO7v" alt=""><figcaption><p>Proprietà SAML2</p></figcaption></figure>

Il certificato del servizio viene utilizzato per firmare le richieste. Non è obbligatorio. Può essere un percorso locale al servizio PSU oppure il nome distinto di un certificato installato nell'archivio certificati Personal Computer.

### Impostazioni aggiuntive

Oltre alle impostazioni disponibili nella console di amministrazione, può anche impostare quanto segue nel file di configurazione `authentication.ps1`.

#### ServiceCertificatePassword

Se utilizza un percorso file per il certificato e questo richiede una password, può specificarla tramite il parametro `-ServiceCertificatePassword` di `Set-PSUAuthenticationMethod`. Il valore di questo parametro è una `SecureString`. Può sfruttare il modulo SecretManagement per caricare i segreti.

```powershell
Set-PSUAuthenticationMethod `
-Type "Saml2" `
-EntityId "http://psu.ironman.local/sp" `
-IdentityProviderEntityId 'https://ironman.local/idp' `
-MetadataAddress 'https://idp.ironman.local/idp/shibboleth' `
-CallbackPath "https://localhost:5000/" `
-ServiceCertificate cert.pfx `
-ServiceCertificatePassword (Get-Secret -Name 'certPassword')
```

#### Configure

Il parametro `-Configure` è un blocco di script che può essere utilizzato per impostare opzioni aggiuntive non esposte da `Set-PSUAuthenticationMethod`. Il blocco di script verrà chiamato quando il provider viene configurato e riceverà un singolo parametro che contiene un oggetto con le opzioni per l'autenticazione SAML2.

L'oggetto è di tipo [Saml2Options](https://github.com/Sustainsys/Saml2/blob/develop/Sustainsys.Saml2.AspNetCore2/Saml2Options.cs). Il sotto-oggetto di SPOptions si trova [qui](https://github.com/Sustainsys/Saml2/blob/20990905ecdcf15f6f76fef80506d53831f7857b/Sustainsys.Saml2/Configuration/SPOptions.cs).

```powershell
Set-PSUAuthenticationMethod `
-Type "Saml2" `
-EntityId "http://psu.ironman.local/sp" `
-IdentityProviderEntityId 'https://ironman.local/idp' `
-MetadataAddress 'https://idp.ironman.local/idp/shibboleth' `
-Configure {
  $options = $args[0]
  $options.SPOptions.DiscoveryServiceUrl = 'https://idp.ironman.local/discovery'
}
```

## Esempio: Entra ID <a href="#example-entra-id" id="example-entra-id"></a>

Configuri un'applicazione aziendale Entra ID all'interno di Azure. Può trovare una [guida dettagliata qui](https://docs.powershelluniversal.com/config/security/openid-connect#configuring-azure-entra-id-azure-active-directory). Sarà necessario recuperare l'ID applicazione e il documento dei metadati di federazione, nonché l'endpoint di accesso SAML-P. All'interno della registrazione dell'applicazione, faccia clic sul pulsante Endpoints.

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

### Passo dopo passo <a href="#step-by-step" id="step-by-step"></a>

**In PowerShell Universal:**

1. Faccia clic su Security \ Authentication.
2. Aggiunga il provider di autenticazione SAML2.
3. Faccia clic sul pulsante Edit Properties.

Per Entity ID, dovrà inserire l'ID applicazione di Entra ID preceduto dal prefisso `spn:`

Ad esempio: `spn:2cf33625-e312-4659-a7bd-66ade51a0ea2`

Per Identity Provider Entity ID, dovrà recuperare l'entity ID dal documento dei metadati di federazione. Apra l'URL del documento in un browser web.

<figure><img src="/files/06uGkCtjhYz7uky3WDUC" alt=""><figcaption></figcaption></figure>

Per Metadata Address, inserisca l'URL del documento dei metadati di federazione.

Per il Return URL, inserisca l'URL del suo server PowerShell Universal con il percorso `/Saml/Acs`.

```
https://localhost/Saml2/Acs
```

Per Single Sign-On Service URL, inserisca l'endpoint di accesso SAML-P di Azure.

<figure><img src="/files/XrzHzhjU3zJaaWPvmH8z" alt=""><figcaption><p>Configurazione di PSU</p></figcaption></figure>

Una volta completato, salvi le impostazioni e abiliti il provider SAML. Faccia clic su Sign out e navighi all'URL della console di amministrazione.

```
https://localhost/admin
```

Verrà inoltrato ad Azure per l'accesso e reindirizzato nuovamente a PowerShell Universal dopo l'autenticazione.

Eventuali errori che si verificano verranno elencati nel log di PowerShell Universal. Se non riesce ad accedere, può navigare a `/login` per accedere con un account locale.

### Mappatura dei claim

Per fornire i claim di gruppo a PowerShell Universal, sarà necessario esporre i claim di gruppo dalla registrazione dell'applicazione. Faccia clic su Token Configuration e poi su Add groups claim.

<figure><img src="/files/S4pSJMMI8C4YL75aVAQC" alt=""><figcaption><p>Claim di gruppo di Entra ID</p></figcaption></figure>

Dopo aver fatto clic su Add groups claim, avrà la possibilità di selezionare quali gruppi vengono forniti. Se seleziona All Groups, i claim di gruppo verranno forniti a PowerShell Universal

Se seleziona Groups assigned to the application, si assicuri di selezionare il valore Emit groups as role claims. Questa impostazione richiede un piano Entra ID a pagamento.

<figure><img src="/files/QIkq7IelWcptP3lBOfF9" alt=""><figcaption><p>Impostazione Emit groups as role claims</p></figcaption></figure>

Per assegnare un gruppo alla registrazione dell'applicazione, individui l'app in Enterprise Applications e faccia clic su User and Groups. Successivamente, faccia clic su Add User\Group e selezioni i gruppi che desidera assegnare all'applicazione.

Una volta configurato il claim di gruppo in Entra ID, può aggiornare le mappature dei claim di PowerShell Universal con i gruppi forniti.

Per ogni ruolo che desidera assegnare a un gruppo Entra ID, specifichi il Claim Type e il Claim Value per quel ruolo. Ad esempio, nel mio ambiente ho un gruppo con l'ID 446832da-d4ad-4972-b0a2-eda736129928. Il Claim Type per questo oggetto è <http://schemas.microsoft.com/ws/2008/06/identity/claims/role>.

Per assegnarlo al gruppo di amministratori, procederei come segue.

<figure><img src="/files/l8DNGqSW6s5Yhg8Fx7wp" alt=""><figcaption><p>Mappatura dei claim</p></figcaption></figure>

Gli utenti di questo gruppo farebbero ora parte del ruolo Administrator in PowerShell Universal. Se ha selezionato una proprietà di gruppo SAML diversa, il valore potrebbe essere differente (ad es. sAMAccountName).

### Eccedenze di gruppi <a href="#group-overages" id="group-overages"></a>

Per le organizzazioni con molti gruppi, sarà opportuno limitare il numero di gruppi forniti a PowerShell Universal. Ciò può alleviare i problemi di autorizzazione derivanti dalla presenza di troppi gruppi forniti, che causano il superamento dei limiti all'interno dell'applicazione. Nelle impostazioni dell'applicazione aziendale, faccia clic su Single sign-on e poi sul pulsante Edit sotto Attributes & Claims.

<figure><img src="/files/82BaRrwjVvshzk8qAuw0" alt=""><figcaption></figcaption></figure>

Faccia clic sul claim dei gruppi per visualizzare le opzioni. Le opzioni avanzate le consentiranno di filtrare i gruppi forniti al server PowerShell Universal. Può anche configurare i claim di gruppo tramite la configurazione del token nella registrazione dell'applicazione per l'applicazione aziendale.

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

## Esempio: Okta

Questo esempio mostra come configurare l'autenticazione SAML2 di Okta per l'uso con PowerShell Universal.

All'interno di Okta, dovrà configurare l'applicazione in modo simile al seguente. SAML2 richiede HTTPS e dovrà includere l'URL della sua istanza di PSU nel Single Sign On URL, seguito da `/Saml2/Acs`. Il percorso distingue tra maiuscole e minuscole.

L'Audience Restriction deve essere l'URL del suo server PowerShell Universal.

![](/files/F6rLhxDi9OCsXnWq9lGe)

Affinché gli utenti possano accedere a PowerShell Universal, dovrà assicurarsi che siano stati assegnati all'applicazione Okta.

![](/files/2WYHh7eL5oTyd6glB1cX)

Nella scheda Sign On dell'applicazione, faccia clic sul pulsante View SAML setup instructions.

![](/files/9Dea1Ny87pKUGkutnzFt)

Dovrà acquisire i due URL e scaricare il certificato per configurare PowerShell Universal. Veda il passo successivo su come utilizzare questi URL nel file `authentication.ps1`.

### authentication.ps1

Il file authentication.ps1 viene utilizzato per configurare PowerShell Universal.

```powershell
Set-PSUAuthenticationMethod -Type "Saml2" `
-EntityId "https://localhost:5001" `
-IdentityProviderEntityId "http://www.okta.com/exk5dvbyzgASPiOFp5d7" `
-CallbackPath "https://localhost:5001" `
-SigningKey "C:\Users\adamr\Downloads\okta.cert" `
-SingleSignOnServiceUrl "https://dev-36706648.okta.com/app/dev-36706648_psusaml_1/exk5dvbyzgASPiOFp5d7/sso/saml"
```

| Parametro                | Descrizione                                                                                                       | Tipo   |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------- | ------ |
| EntityId                 | Questo valore deve corrispondere a quanto inserito in Audience Restriction all'interno di Okta.                   | string |
| IdentityProviderEntityId | Questo è il valore presentato nella pagina View SAML setup instructions.                                          | string |
| CallbackPath             | Questo è il percorso a cui l'utente verrà reindirizzato se non è stato fornito alcun percorso di reindirizzamento | string |
| SigningKey               | Questo è il file del certificato scaricato nella pagina View SAML setup instructions.                             | string |
| SingleSignOnServiceUrl   | Questo è l'URL di accesso fornito nella pagina View SAML setup instructions.                                      | string |

## Esempio: Shibboleth

Questo esempio mostra come configurare Shibboleth per l'uso con PowerShell Universal. Fornisce la configurazione di base e non segue necessariamente le migliori pratiche.

Si presuppone che abbia installato Shibboleth Identity Provider v4 con integrazione Active Directory.

### ldap.properties

Le proprietà LDAP sono state configurate per l'autenticazione sul dominio locale utilizzando un account di amministratore di dominio. L'URL LDAP è stato configurato e TLS è stato disabilitato.

Di seguito troverà l'esempio completo del file `ldap.properties`.

```
# LDAP authentication (and possibly attribute resolver) configuration
# Note, this doesn't apply to the use of JAAS authentication via LDAP

## Authenticator strategy, either anonSearchAuthenticator, bindSearchAuthenticator, directAuthenticator, adAuthenticator
idp.authn.LDAP.authenticator=adAuthenticator

## Connection properties ##
idp.authn.LDAP.ldapURL=ldap://ironman.local:389
idp.authn.LDAP.useStartTLS                     = false
# Time in milliseconds that connects will block
#idp.authn.LDAP.connectTimeout                  = PT3S
# Time in milliseconds to wait for responses
#idp.authn.LDAP.responseTimeout                 = PT3S
# Connection strategy to use when multiple URLs are supplied, either ACTIVE_PASSIVE, ROUND_ROBIN, RANDOM
#idp.authn.LDAP.connectionStrategy               = ACTIVE_PASSIVE

## SSL configuration, either jvmTrust, certificateTrust, or keyStoreTrust
idp.authn.LDAP.sslConfig                       = jvmTrust
## If using certificateTrust above, set to the trusted certificate's path
idp.authn.LDAP.trustCertificates=%{idp.home}/credentials/ldap-server.crt
## If using keyStoreTrust above, set to the truststore path
idp.authn.LDAP.trustStore=%{idp.home}/credentials/ldap-server.truststore

## Return attributes during authentication
idp.authn.LDAP.returnAttributes=passwordExpirationTime,loginGraceRemaining,sn,mail

## DN resolution properties ##

# Search DN resolution, used by anonSearchAuthenticator, bindSearchAuthenticator
# for AD: CN=Users,DC=example,DC=org
idp.authn.LDAP.baseDN=CN=Users,DC=ironman, DC=local
idp.authn.LDAP.subtreeSearch                   = true
idp.authn.LDAP.userFilter=(sAMAccountName={user})
# bind search configuration
# for AD: idp.authn.LDAP.bindDN=adminuser@domain.com
idp.authn.LDAP.bindDN=administrator@ironman.local

# Format DN resolution, used by directAuthenticator, adAuthenticator
# for AD use idp.authn.LDAP.dnFormat=%s@domain.com
idp.authn.LDAP.dnFormat=%s@ironman.local

# pool passivator, either none, bind or anonymousBind
#idp.authn.LDAP.bindPoolPassivator                  = none

# LDAP attribute configuration, see attribute-resolver.xml
# Note, this likely won't apply to the use of legacy V2 resolver configurations
idp.attribute.resolver.LDAP.ldapURL=%{idp.authn.LDAP.ldapURL}
idp.attribute.resolver.LDAP.connectTimeout=%{idp.authn.LDAP.connectTimeout:PT3S}
idp.attribute.resolver.LDAP.responseTimeout=%{idp.authn.LDAP.responseTimeout:PT3S}
idp.attribute.resolver.LDAP.connectionStrategy=%{idp.authn.LDAP.connectionStrategy:ACTIVE_PASSIVE}
idp.attribute.resolver.LDAP.baseDN=%{idp.authn.LDAP.baseDN:undefined}
idp.attribute.resolver.LDAP.bindDN=%{idp.authn.LDAP.bindDN:undefined}
idp.attribute.resolver.LDAP.useStartTLS=%{idp.authn.LDAP.useStartTLS:true}
idp.attribute.resolver.LDAP.trustCertificates=%{idp.authn.LDAP.trustCertificates:undefined}
idp.attribute.resolver.LDAP.searchFilter=(sAMAccountName=$resolutionContext.principal)

# LDAP pool configuration, used for both authn and DN resolution
#idp.pool.LDAP.minSize                          = 3
#idp.pool.LDAP.maxSize                          = 10
#idp.pool.LDAP.validateOnCheckout               = false
#idp.pool.LDAP.validatePeriodically             = true
#idp.pool.LDAP.validatePeriod                   = PT5M
#idp.pool.LDAP.validateDN                       =
#idp.pool.LDAP.validateFilter                   = (objectClass=*)
#idp.pool.LDAP.prunePeriod                      = PT5M
#idp.pool.LDAP.idleTime                         = PT10M
#idp.pool.LDAP.blockWaitTime                    = PT3S

```

### relying-party.xml

Il file `relying-party.xml` è stato aggiornato per abilitare l'IdP aperto. Ciò significa che qualsiasi entity ID può comunicare con il provider di identità. È anche possibile configurarlo per applicare entity ID specifici. Anche la configurazione predefinita è stata modificata per utilizzare il bean `SAML2.AttributeQuery`.

```
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:c="http://www.springframework.org/schema/c"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
                           
       default-init-method="initialize"
       default-destroy-method="destroy">

    <!--
    Unverified RP configuration, defaults to no support for any profiles. Add <ref> elements to the list
    to enable specific default profile settings (as below), or create new beans inline to override defaults.
    
    "Unverified" typically means the IdP has no metadata, or equivalent way of assuring the identity and
    legitimacy of a requesting system. To run an "open" IdP, you can enable profiles here.
    -->
    <bean id="shibboleth.UnverifiedRelyingParty" parent="RelyingParty">
        <property name="profileConfigurations">
            <list>
			<bean parent="SAML2.SSO" p:encryptAssertions="false" />
            </list>
        </property>
    </bean>

    <!-- Default configuration, with default settings applied for all profiles. -->
    <bean id="shibboleth.DefaultRelyingParty" parent="RelyingParty">
        <property name="profileConfigurations">
            <list>
                <!-- SAML 1.1 and SAML 2.0 AttributeQuery are disabled by default. -->
                <!--
                <bean parent="Shibboleth.SSO" />
                <ref bean="SAML1.AttributeQuery" />
                <ref bean="SAML1.ArtifactResolution" />
                -->
                <bean parent="SAML2.SSO" />
                <ref bean="SAML2.ECP" />
                <ref bean="SAML2.Logout" />
                <ref bean="SAML2.AttributeQuery" />
                <ref bean="SAML2.ArtifactResolution" />
                <ref bean="Liberty.SSOS" />
            </list>
        </property>
    </bean>
</beans>

```

### attribute-resolver.xml

Il file `attribute-resolver.xml` è stato aggiornato per utilizzare il Data Connector LDAPDirectory. Carica l'indirizzo e-mail, il nome, il cognome (SN) e il nome visualizzato da Active Directory. Quindi mappa il Principal Name, che sarà il nome utente dell'utente che effettua l'accesso, al tipo di claim richiesto utilizzando un codificatore di attributi.

```
<?xml version="1.0" encoding="UTF-8"?>
<!--
    This file is an EXAMPLE configuration file containing some example attributes
    based on some commonly used approaches when LDAP is the principal data source.
     
    Not all attribute definitions or data connectors are demonstrated, but some
    LDAP attributes common to Shibboleth deployments (and some not so common) are
    included.

    This example is in no way usable as a substitute for reading the documentation.    
-->
<AttributeResolver
        xmlns="urn:mace:shibboleth:2.0:resolver"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:mace:shibboleth:2.0:resolver http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd">

    <!-- ========================================== -->
    <!--      Attribute Definitions                 -->
    <!-- ========================================== -->

    <!-- Simple attributes are exported directly from the LDAP connector. -->

    <AttributeDefinition id="uid" xsi:type="PrincipalName" />
    <AttributeDefinition id="username" xsi:type="PrincipalName">
         <AttributeEncoder xsi:type="SAML2String" name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" friendlyName="displayName" encodeType="false" />
    </AttributeDefinition>

    <!-- ========================================== -->
    <!--      Data Connectors                       -->
    <!-- ========================================== -->

    <!-- Example LDAP Connector -->

    <DataConnector id="myLDAP" xsi:type="LDAPDirectory"
        ldapURL="%{idp.attribute.resolver.LDAP.ldapURL}"
        baseDN="%{idp.attribute.resolver.LDAP.baseDN}" 
        principal="%{idp.attribute.resolver.LDAP.bindDN}"
        principalCredential="%{idp.attribute.resolver.LDAP.bindDNCredential}"
        useStartTLS="%{idp.attribute.resolver.LDAP.useStartTLS:true}"
        connectTimeout="%{idp.attribute.resolver.LDAP.connectTimeout}"
        responseTimeout="%{idp.attribute.resolver.LDAP.responseTimeout}"
        connectionStrategy="%{idp.attribute.resolver.LDAP.connectionStrategy}"
        noResultIsError="true"
        multipleResultsIsError="true"
        excludeResolutionPhases="c14n/attribute"
        exportAttributes="mail displayName sn givenName">
        <FilterTemplate>
            <![CDATA[
                %{idp.attribute.resolver.LDAP.searchFilter}
            ]]>
        </FilterTemplate>
        <ConnectionPool
            minPoolSize="%{idp.pool.LDAP.minSize:3}"
            maxPoolSize="%{idp.pool.LDAP.maxSize:10}"
            blockWaitTime="%{idp.pool.LDAP.blockWaitTime:PT3S}"
            validatePeriodically="%{idp.pool.LDAP.validatePeriodically:true}"
            validateTimerPeriod="%{idp.pool.LDAP.validatePeriod:PT5M}"
            validateDN="%{idp.pool.LDAP.validateDN:}"
            validateFilter="%{idp.pool.LDAP.validateFilter:(objectClass=*)}"
            expirationTime="%{idp.pool.LDAP.idleTime:PT10M}"/>
    </DataConnector>

</AttributeResolver>

```

### attribute-filter.xml

Il file `attribute-filter.xml` è stato aggiornato per rilasciare diversi degli attributi mappati dal data connector LDAPDirectory, nonché il nome utente che verrà utilizzato come identità all'interno di PowerShell Universal.

```
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    This file is an EXAMPLE policy file.  While the policy presented in this 
    example file is illustrative of some simple cases, it relies on the names of
    non-existent example services and the example attributes demonstrated in the
    default attribute-resolver.xml file.

    This example does contain some usable "general purpose" policies that may be
    useful in conjunction with specific deployment choices, but those policies may
    not be applicable to your specific needs or constraints.    
-->
<AttributeFilterPolicyGroup id="ShibbolethFilterPolicy"
        xmlns="urn:mace:shibboleth:2.0:afp"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:mace:shibboleth:2.0:afp http://shibboleth.net/schema/idp/shibboleth-afp.xsd">

<AttributeFilterPolicy id="example1">
        <PolicyRequirementRule xsi:type="ANY" />
        <AttributeRule attributeID="username">
            <PermitValueRule xsi:type="ANY" />
        </AttributeRule>
        <AttributeRule attributeID="displayName">
            <PermitValueRule xsi:type="ANY" />
        </AttributeRule>
        <AttributeRule attributeID="uid">
            <PermitValueRule xsi:type="ANY" />
        </AttributeRule>
        <AttributeRule attributeID="mail">
            <PermitValueRule xsi:type="ANY" />
        </AttributeRule>
        <AttributeRule attributeID="sn">
            <PermitValueRule xsi:type="ANY" />
        </AttributeRule>
    </AttributeFilterPolicy>
 


</AttributeFilterPolicyGroup>

```


---

# 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/it/sicurezza/enterprise-security/saml2.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.
