> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Active Directory as a SAML 2.0 External Identity Provider

> Configure Active Directory Federation Services (AD FS) as a SAML 2.0 External Identity Provider for your ABBYY Vantage tenant.

## Prerequisites

* Ensure that you have a Vantage tenant identifier before configuring identities. To get a tenant identifier, click **Configuration** in ABBYY Vantage. The identifier is on the **General** tab.
* Create a Redirect URI to receive the authentication responses. The URI is: \
  `https://<your-vantage-url>/auth2/Saml2/Acs`

## Setup

The setup process consists of the following steps:

* [Adding a claim description](#adding-a-claim-description)
* [Configuring a relying party trust](#configuring-a-relying-party-trust)
* [Adding rules to transform an incoming claim](#adding-rules-to-transform-an-incoming-claim)

### Adding a claim description

<Steps>
  <Step title="Open the management console">
    Open the AD FS management console.
  </Step>

  <Step title="Open Add Claim Description">
    Select **Service > Claim Descriptions**, then click **Add Claim Description**.
  </Step>

  <Step title="Fill in the claim description">
    Specify the following:

    * **Display name** — for example, `Persistent Identifier`.
    * **Claim type** — `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`.
    * Select **Publish this claim description in federation metadata as a claim type that this federation service can accept**.
    * Select **Publish this claim description in federation metadata as a claim type that this federation service can send**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/jZX7kaKQgdxaDiIT/images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_1.png?fit=max&auto=format&n=jZX7kaKQgdxaDiIT&q=85&s=ac11e65fe576aa3a7cd27a277b3d3772" alt="AD FS Add Claim Description dialog with display name and Persistent Identifier claim type fields" style={{ width:"71%" }} width="638" height="610" data-path="images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_1.png" />
    </Frame>
  </Step>

  <Step title="Confirm">
    Click **OK**.
  </Step>
</Steps>

Now you can control how user attributes are mapped between different systems.

### Configuring a relying party trust

To create an AD FS relying party trust, follow these steps:

<Steps>
  <Step title="Add a Relying Party Trust">
    In the console tree, under **AD FS**, select **Trust Relationships > Relying Party Trusts > Add Relying Party Trust**.
  </Step>

  <Step title="Start the wizard">
    On the **Welcome** page, choose **Claims aware** and click **Start**.
  </Step>

  <Step title="Select the data source">
    On the **Select Data Source** page, select **Enter data about the relying party manually**, then click **Next**.
  </Step>

  <Step title="Specify a display name">
    On the **Specify Display Name** page, enter any name in **Display Name**, then click **Next**.
  </Step>

  <Step title="Choose the profile">
    On the **Choose Profile** page, select the **AD FS 2.0 profile**, then click **Next**.
  </Step>

  <Step title="Configure the certificate">
    On the **Configure Certificate** page, click **Next**.
  </Step>

  <Step title="Configure the URL">
    On the **Configure URL** page, select **Enable support for the SAML 2.0 WebSSO protocol**. Under **Relying party SAML 2.0 SSO service URL**, enter `https://<your-vantage-url>/auth2/Saml2/Acs`, then click **Next**.
  </Step>

  <Step title="Configure identities">
    * Under **Relying party trust identifier**, enter `api://platform.abbyy.cloud/tenantId`, where `tenantId` is the tenant identifier in GUID format **without hyphens** (for example, `117489fc1aea41658369d4d18d6557ga`). This value will be used as the Application ID URI for authentication. Copy this value — you'll need it when configuring the External Identity Provider in Vantage. Click **Add**.
    * In the **Expose an API** tab, set the Application ID URI to the same value you entered above (for example, `api://cccc3333-dddd-4444-eeee-5555ffff6666`). Click **Add**, then click **Next**.
  </Step>

  <Step title="Choose Issuance Authorization Rules">
    To grant Vantage access to all users, select **Permit all users to access this relying party**. To restrict access to a specific group, select **Permit specific group** and specify the group. Click **Next**.
  </Step>

  <Step title="Add the trust">
    On the **Ready to Add Trust** page, review the settings. Click **Next**, then click **Close**.
  </Step>
</Steps>

A trust relationship between an Identity Provider and ABBYY Vantage is established.

### Adding rules to transform an incoming claim

To apply rules to transform an incoming claim, follow these steps:

<Steps>
  <Step title="Open Relying Party Trusts">
    Click **Relying Party Trusts**.
  </Step>

  <Step title="Edit the Claim Issuance Policy">
    Right-click the selected trust, then click **Edit Claim Issuance Policy**.
  </Step>

  <Step title="Add a rule">
    In the **Edit Claim Issuance Policy for \<name>** window, click **Add Rule**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/jZX7kaKQgdxaDiIT/images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_2.png?fit=max&auto=format&n=jZX7kaKQgdxaDiIT&q=85&s=ce66660c440732b209b9cefd1ed8fdab" alt="AD FS Edit Claim Issuance Policy dialog with Add Rule button for SAML claim rules" style={{ width:"60%" }} width="486" height="543" data-path="images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_2.png" />
    </Frame>
  </Step>

  <Step title="Select the rule template">
    Select the **Transform an Incoming Claim** claim rule template, then click **Next**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/jZX7kaKQgdxaDiIT/images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_3.png?fit=max&auto=format&n=jZX7kaKQgdxaDiIT&q=85&s=323c987dcbc44d4183160f9e50f18939" alt="AD FS Add Transform Claim Rule wizard with Transform an Incoming Claim template selected" style={{ width:"72%" }} width="716" height="582" data-path="images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_3.png" />
    </Frame>
  </Step>

  <Step title="Configure the claim rule">
    Select the **Configure Claim Rule** step, then specify the following:

    * **Claim rule name** — `TransformWindows account name`.
    * **Incoming claim type** — **Windows account name**.
    * **Outgoing claim type** — **Name ID**.
    * **Outgoing name ID format** — **Persistent Identifier**.
    * Select **Pass through all claim values**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/jZX7kaKQgdxaDiIT/images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_5.png?fit=max&auto=format&n=jZX7kaKQgdxaDiIT&q=85&s=8ffeb41e66f7c368433f79475e2057a0" alt="AD FS Configure Claim Rule step with Windows account name as incoming claim and Persistent Identifier as outgoing format" style={{ width:"74%" }} width="716" height="582" data-path="images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_5.png" />
    </Frame>
  </Step>

  <Step title="Finish the first rule">
    Click **Finish**.
  </Step>

  <Step title="Add a Send LDAP Attributes rule">
    Add another rule to ensure email and name claims are included in the issued token. On the **Select Rule Template** page, select **Send LDAP Attributes as Claims** under **Claim rule template**, then click **Next**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/jZX7kaKQgdxaDiIT/images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_4.png?fit=max&auto=format&n=jZX7kaKQgdxaDiIT&q=85&s=ddda2279d705a482c6f69f92507cdafb" alt="AD FS Add Transform Claim Rule wizard with Send LDAP Attributes as Claims template selected" style={{ width:"71%" }} width="718" height="583" data-path="images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_4.png" />
    </Frame>
  </Step>

  <Step title="Configure the LDAP rule">
    On the **Configure Claim Rule** page, select the **Active Directory** attribute store under **Claim rule name**, then click **Finish**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/jZX7kaKQgdxaDiIT/images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_6.png?fit=max&auto=format&n=jZX7kaKQgdxaDiIT&q=85&s=4cf4fa5ecbe25939dc952cc498470754" alt="AD FS Configure Claim Rule with Active Directory attribute store and email and name LDAP attribute mappings" style={{ width:"73%" }} width="718" height="583" data-path="images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_6.png" />
    </Frame>
  </Step>

  <Step title="Verify the rules">
    The added rules are displayed in the **Edit Claim Rules** dialog.

    <Frame>
      <img src="https://mintcdn.com/abbyy/jZX7kaKQgdxaDiIT/images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_7.png?fit=max&auto=format&n=jZX7kaKQgdxaDiIT&q=85&s=41259ea91239a8c1cfba5e1e140b2e87" alt="AD FS Edit Claim Rules dialog showing both Persistent Identifier and Send LDAP Attributes as Claims rules" style={{ width:"60%" }} width="487" height="546" data-path="images/vantage/tenant-admin/sysadmin_identityprovider_activedirectory_saml_7.png" />
    </Frame>
  </Step>
</Steps>

## Next steps

Once AD FS is configured, connect it to your Vantage tenant. You'll need the federation metadata document URL in the format `https://<adfs-server-address>/federationmetadata/2007-06/federationmetadata.xml` — for example, `https://adfs.platform.local/federationmetadata/2007-06/federationmetadata.xml`.

For the Vantage-side setup, see [Setting up an External Identity Provider for a tenant](/vantage/documentation/tenant-admin/tenant-management/configuring-tenant).

## Related topics

<CardGroup cols={2}>
  <Card title="Configuring a SAML 2.0 External Identity Provider" icon="shield-halved" href="/vantage/documentation/tenant-admin/tenant-management/saml-2-0">
    Overview of SAML 2.0 setup for AD FS or Azure AD
  </Card>

  <Card title="Azure Active Directory as a SAML 2.0 External Identity Provider" icon="cloud" href="/vantage/documentation/tenant-admin/tenant-management/saml-2-0-azure-active-directory">
    Configure Azure AD instead of on-premises AD FS
  </Card>

  <Card title="Setting up an External Identity Provider for a tenant" icon="sliders" href="/vantage/documentation/tenant-admin/tenant-management/configuring-tenant">
    Connect AD FS to your Vantage tenant
  </Card>

  <Card title="Testing external authentication" icon="vial" href="/vantage/documentation/tenant-admin/tenant-management/testing-external-auth">
    Verify the External Identity Provider before users sign in
  </Card>
</CardGroup>
