Connect AD FS
Learn how to configure a connection to Microsoft Active Directory Federation Services (AD FS)
Each SSO Identity Provider requires specific information to create and configure a new Connection. Often, the information required to create a Connection will differ by Identity Provider.
To create an AD FS SAML Connection, you'll need four pieces of information: an ACS URL, an Identity Provider Issuer (also known as an Entity ID), an Identity Provider SSO URL, and an X.509 Certificate.
- ACS URL
- Identity Provider SSO URL
- Relying Party Trust ID
- Relying Party Trust Certificate
- X.509 Certificate
WorkOS provides the ACS URL for AD FS Connections. This is readily available in your Connection's Settings in the Developer Dashboard.
And then, you provide the Identity Provider SSO URL, as well as the Relying Party Trust ID, Relying Party Trust Certificate, and the X.509 Certificate.
The Identity Provider SSO URL is your application's login endpoint. When your customer's users follow this URL, we redirect them to the appropriate AD FS instance for authentication and sign in.
For AD FS SAML, the Identity Provider SSO URL usually takes the standard form:
Next comes the Relying Party Trust ID. This will be your applications domain.
The Relying Party Trust ID communicates to the AD FS instance where it can expect valid SAML claims to come from. The instance will trust this listed relying party so that when a user is authenticated, they can be redirected back to that trusted application.
And then comes the Relying Party Trust and X.509 Certificates. You'll generate these in Step 1 below.
Begin by creating a local directory to store your keys and certificates. Then, clone and run mellon_create_metadata.sh:
touch mellon_create_metadata.sh && vi mellon_create_metadata.sh
chmod +x mellon_create_metadata.sh
./mellon_create_metadata.sh example.com https://example.com/auth/adfs/
example.comin the commands above with your application's authorization domain.
You'll receive output similar to:
Navigate to the AD FS Management Console.
Select "Add Relying Party Trust" to launch the "Add Relying Party Trust Wizard."
During the "Select Data Source" step, select "Import data about the relying party trust from a file" and then select the
.xmlmetadata file generated earlier. Select "Open" and then "Next"
Specify a Display Name for your application's Relying Party and click "Next."
Confirm "Permit Everyone" is selected for your Access Control Policy, and click "Next".
Confirm the URLs in the "Endpoints" tab match those in the certificate generation output from above.
Check the "Configure claims issuance policy for this application" and then click "Close."
You'll see an empty list of Claim Issuange Policy Rules. Click "Add Rule".
Select "Send LDAP Attributes as Claims" as a Claim rule template and click "Next".
Enter "Attributes" for the Claim rule name. Select "Active Directory" as the Attribute store. Finally, map the claim types as they appear in the example above. Then, this Enterprise's AD FS instance is configured to begin authorizing users for your application via SSO!
Finally, upload the Certificate in your WorkOS Connection Settings. Your Connection will then be verified and good to go!
Check out a demo of how quick and easy it is to integrate AD FS SSO into your application after configuring your Connection!