# AD FS SAML single sign-on

<!-- Generated by scripts/generate.ts. Do not edit. -->

Add a relying party trust in AD FS from our metadata, add claim rules that send the email address, and share your federation metadata with us.

:::caution[Verification]
Not yet verified on a real AD FS tenant. It was written from the public AD FS documentation, so labels in the admin console may differ slightly.
:::

The values in braces, such as `{metadata_url}`, are specific to your connection. The setup link from the application you are connecting shows them with a copy button. The same steps appear there.

## Steps

<ol class="idp-steps">

<li class="idp-step">

<a id="create-trust"></a>

### Add a relying party trust from our metadata

On the federation server, open Server Manager > Tools > AD FS Management. Under Actions, select Add Relying Party Trust, choose Claims aware and select Start. Choose "Import data about the relying party published online or on a local network", paste `{metadata_url}` into Federation metadata address and select Next.

Only for the `metadata` setup method.

<div class="setup-values">

Paste into AD FS:

- SP metadata URL: `{metadata_url}`

</div>

Fixes: [`saml_destination_mismatch`](/errors/saml_destination_mismatch/), [`saml_audience_mismatch`](/errors/saml_audience_mismatch/), [`saml_response_malformed`](/errors/saml_response_malformed/)

</li>

<li class="idp-step">

<a id="manual-trust"></a>

### Add a relying party trust by hand

On the federation server, open Server Manager > Tools > AD FS Management. Under Actions, select Add Relying Party Trust, choose Claims aware and select Start. Choose "Enter data about the relying party manually". On Configure URL, select "Enable support for the SAML 2.0 WebSSO protocol" and paste `{acs_url}` into Relying party SAML 2.0 SSO service URL. On Configure Identifiers, add `{sp_entity_id}`.

Only for the `manual` setup method.

<div class="setup-values">

Paste into AD FS:

- ACS URL: `{acs_url}`
- SP entity ID: `{sp_entity_id}`

</div>

Fixes: [`saml_destination_mismatch`](/errors/saml_destination_mismatch/), [`saml_audience_mismatch`](/errors/saml_audience_mismatch/)

</li>

<li class="idp-step">

<a id="access"></a>

### Choose who can sign in

Enter a display name, choose an access control policy that lets your users in (for example Permit everyone), review the settings and finish the wizard.

Fixes: [`saml_idp_status_error`](/errors/saml_idp_status_error/)

</li>

<li class="idp-step">

<a id="claims"></a>

### Send the email address and name ID

In the claim rules for the trust, add a rule that sends the LDAP attributes E-Mail-Addresses, Given-Name and Surname as E-Mail Address, Given Name and Surname, and a rule that transforms E-Mail Address into Name ID with the Email format.

Fixes: [`saml_nameid_missing`](/errors/saml_nameid_missing/), [`saml_email_missing`](/errors/saml_email_missing/)

:::caution[Labels not confirmed in step 4]
The claim rule template names are not on the page read on 2026-10-11, and that page is archived Windows Server 2012 content.
:::

</li>

<li class="idp-step">

<a id="signing"></a>

### Check the signing settings

In the trust's properties, on the Advanced tab, set the secure hash algorithm to SHA-256.

Fixes: [`saml_signature_missing`](/errors/saml_signature_missing/), [`saml_signature_algorithm_weak`](/errors/saml_signature_algorithm_weak/)

:::caution[Labels not confirmed in step 5]
The signature settings are not on the page read on 2026-10-11.
:::

</li>

<li class="idp-step">

<a id="metadata"></a>

### Share your federation metadata

Add your AD FS federation metadata to this setup, usually https://your-adfs-host/FederationMetadata/2007-06/FederationMetadata.xml (or upload the file). Do this again whenever the token-signing certificate changes.

Fixes: [`saml_signature_invalid`](/errors/saml_signature_invalid/), [`saml_issuer_mismatch`](/errors/saml_issuer_mismatch/)

:::caution[Labels not confirmed in step 6]
The federation metadata path is the AD FS default and is not on the page read on 2026-10-11.
:::

</li>

<li class="idp-step">

<a id="test"></a>

### Test the connection

Run a test sign-in in this setup, signing in with an account the access control policy allows.

</li>

</ol>

<a id="standby"></a>

## Optional: check the standby endpoint

If our main network ever has an outage, sign-ins can continue through a standby address, but only if AD FS accepts it. A relying party trust created from `{metadata_url}` already has it as a second SAML assertion consumer endpoint. If you entered the data manually, open the trust's properties, and on the Endpoints tab add a SAML Assertion Consumer endpoint with binding POST, index 1 and URL `{standby_acs_url}`. Then confirm in this setup that you added it.

<div class="setup-values">

Paste into AD FS:

- SP metadata URL: `{metadata_url}`
- Standby ACS URL: `{standby_acs_url}`

</div>

This step is optional. See [standby route behavior](/trust/standby/) for what the standby address does during an outage.

## Sources

- [Create a Relying Party Trust (Microsoft Learn, archived Windows Server 2012 content)](https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/create-a-relying-party-trust), read on 2026-10-11
