Skip to main content

AD FS (Windows Server 2025)

This guide connects self-hosted Appsmith to Active Directory Federation Services (AD FS) on Windows Server 2025 using SAML 2.0. Users sign in with their Windows Active Directory accounts. AD FS authenticates the user and sends a signed SAML response to Appsmith through the browser.

AD FS is an on-premises identity provider. For Microsoft's cloud identity provider, use the Microsoft Entra ID SAML guide.

Validated environment

This procedure was validated with Appsmith Airgap v2.6.0 and AD FS on Windows Server 2025, backed by Windows Server Active Directory. Validation covered a successful SAML login with an AD test user. Screens and generated SAML endpoints can differ in other versions; always copy the values shown by your Appsmith instance.

Prerequisites​

Complete these steps before creating the AD FS relying-party trust:

  • Install self-hosted Appsmith with a license that includes SAML SSO. See the installation guides.
  • Deploy AD FS on Windows Server 2025 and connect it to your Active Directory domain. You need access to AD FS Management and permission to create relying-party trusts and claim rules. Deploying a domain controller or an AD FS farm is outside this guide; see Microsoft's AD FS lab setup if you are building a test environment.
  • Configure Appsmith at its final HTTPS address, such as https://appsmith.example.com. Install its certificate using the existing Custom Domain and SSL guide. Set Admin Settings > Configuration > Appsmith Base URL to that same HTTPS address before configuring SAML.
  • Configure AD FS with its own HTTPS service name and certificate, such as https://fs.example.com.
  • Verify that the browser used for login can resolve and reach both services and trusts both HTTPS certificate chains. Each computer has its own certificate trust store. Trusting a lab CA on an AD FS server does not make a separate workstation trust it. For a private CA, follow your organization's certificate-distribution procedure. See Custom CA Root Certificate for Appsmith's server trust configuration.
  • Verify that each test user's E-mail field is populated in Active Directory. In Active Directory Users and Computers, open the user and check Properties > General > E-mail. The claim rules below read this attribute; a user logon name alone does not populate it.
  • Keep access to an Appsmith administrator account that can use form login while setting up SAML. If replacing an existing SAML provider, disconnect it through Admin Settings > Authentication > SAML 2.0 before registering AD FS. Plan for the interruption to existing SAML sign-ins.
HTTPS is required before SAML setup

The AD FS wizard requires an HTTPS SAML WebSSO callback. Appsmith and AD FS need separate HTTPS certificates, each matching its own address. For an IP-based lab URL, the Appsmith certificate must contain that IP address in its Subject Alternative Name (SAN). A DNS-only certificate does not cover an IP address.

The wizard's optional Configure Certificate page is for SAML token encryption. It does not install an HTTPS certificate for Appsmith or AD FS. Complete HTTPS installation and trust first; do not bypass a browser certificate warning to validate the customer setup.

Screenshot values

The screenshots use the lab Appsmith address https://10.0.0.33 and AD FS name fs.adfs.lab.test. Replace those with your deployment's addresses. The example.com addresses in the text are placeholders, not values to enter unchanged. You can use any supported browser on a computer that meets the DNS, connectivity, and certificate-trust prerequisites; Edge on the AD FS server is not required.

Get Appsmith's SAML addresses​

  1. Open Appsmith at its final HTTPS address and sign in as an Appsmith administrator.
  2. Go to Admin Settings > Authentication and click Enable for SAML 2.0.
  3. Copy the Redirect URL and Entity ID from the configuration page. Leave the page open; you will enter AD FS metadata later.
Appsmith Authentication settings with Enable beside SAML 2.0
Enable SAML 2.0 in Appsmith's Admin Settings.

Use each value in the corresponding AD FS field:

Appsmith fieldAD FS fieldExample from the validated version
Redirect URLRelying party SAML 2.0 SSO service URLhttps://appsmith.example.com/auth/realms/appsmith/broker/saml/endpoint
Entity IDRelying party trust identifierhttps://appsmith.example.com/auth/realms/appsmith

Copy the full values, including the scheme, hostname, port if present, and path. Do not enter the callback URL as the Entity ID. Avoid localhost when the login browser is on another machine.

Create the AD FS relying-party trust​

On the Windows Server 2025 AD FS server:

  1. Open Server Manager > Tools > AD FS Management.
Server Manager Tools menu with AD FS Management highlighted
Open AD FS Management on the federation server.
  1. Select Relying Party Trusts, then click Add Relying Party Trust.
AD FS Management with Relying Party Trusts selected and Add Relying Party Trust highlighted
Create a relying-party trust for Appsmith.
  1. On Welcome, select Claims aware, then click Start.
Add Relying Party Trust Wizard with Claims aware selected
Appsmith uses a claims-aware SAML relying-party trust.
  1. On Select Data Source, choose Enter data about the relying party manually, then click Next.
Select Data Source page with Enter data about the relying party manually selected
Enter the addresses copied from Appsmith manually.
  1. On Specify Display Name, enter a recognizable name, such as Appsmith, then click Next. The screenshots use Appsmith Airgap.
Specify Display Name page before a name is entered
The wizard opens the display-name field. Enter a name users and administrators will recognize.
Specify Display Name page with Appsmith Airgap entered
The lab uses Appsmith Airgap as the relying-party display name.
  1. On Configure Certificate, leave the optional token-encryption certificate blank for this signed, unencrypted assertion flow, then click Next. The HTTPS certificates from the prerequisites must already be installed.
Configure Certificate page with the optional token-encryption certificate left blank
This optional certificate encrypts SAML tokens; it does not configure HTTPS.
  1. On Configure URL, select Enable support for the SAML 2.0 WebSSO protocol. In Relying party SAML 2.0 SSO service URL, paste the Redirect URL copied from Appsmith. Leave WS-Federation unselected for this SAML integration and click Next.
  2. On Configure Identifiers, paste Appsmith's Entity ID into Relying party trust identifier. Click Add so it appears in the identifiers list, then click Next.
Configure Identifiers page showing the Appsmith Entity ID and the Add button
Add the exact Entity ID shown in Appsmith, rather than its Redirect URL.
  1. On Choose Access Control Policy, select a policy that permits the intended AD users or groups, then click Next. The screenshot shows Permit everyone, which was used for the lab. Use a policy appropriate for your organization's access requirements.
Choose Access Control Policy page showing Permit everyone selected in the lab
Select your access policy. Permit everyone is the lab example, not a required production setting.
  1. Review the values on Ready to Add Trust, then click Next.
  2. On Finish, leave Configure claims issuance policy for this application selected and click Close. If the claim-policy window does not open, right-click the new trust in Relying Party Trusts and select Edit Claim Issuance Policy.
Wizard Finish page confirming the relying-party trust was added and offering to configure its claims policy
Finish the trust wizard and open its claim issuance policy.

Configure the email and Name ID claim rules​

Create the following two rules under Issuance Transform Rules, in this order. The first reads the user's AD email attribute. The second sends that email as the SAML Name ID used to identify the user.

AD FS Management action to edit the Appsmith relying party's claim issuance policy
Open the claim issuance policy for the Appsmith relying-party trust.
New Appsmith claim issuance policy with an empty Issuance Transform Rules list and the Add Rule button
A new trust starts with an empty rule list. Add the two rules below.

Send the user's email​

  1. Click Add Rule.
  2. Select Send LDAP Attributes as Claims, then click Next.
Select Rule Template page with Send LDAP Attributes as Claims selected
Choose the LDAP attribute rule template.
  1. Set these values:
Configure Rule page showing the Send user email rule name and Active Directory attribute store before mapping the email attribute
Name the rule and select Active Directory before adding the email mapping.
FieldValue
Claim rule nameSend user email
Attribute storeActive Directory
LDAP AttributeE-Mail-Addresses
Outgoing Claim TypeE-Mail Address
  1. Click Finish.
LDAP claim rule mapping E-Mail-Addresses from Active Directory to the E-Mail Address outgoing claim
Map the AD email attribute to the E-Mail Address claim.

Send the email as Name ID​

  1. Click Add Rule again.
  2. Select Transform an Incoming Claim, then click Next.
Select Rule Template page with Transform an Incoming Claim selected
Choose the transformation template for the Name ID rule.
  1. Set these values:
FieldValue
Claim rule nameEmail as Name ID
Incoming claim typeE-Mail Address
Outgoing claim typeName ID
Outgoing name ID formatEmail
Claim valuesPass through all claim values
  1. Click Finish. Verify that Send user email is above Email as Name ID, then click Apply > OK.
Transform claim rule from E-Mail Address to Name ID with Email format and pass-through values selected
Send the user's email as an email-format SAML Name ID.
Saved issuance transform rules showing Send user email first and Email as Name ID second
Save both claim rules in this order.

AD FS uses its token-signing certificate to sign assertions. Keep signature validation enabled. This token-signing certificate is separate from the HTTPS certificate used to secure the AD FS website. For background, see Microsoft's guidance on LDAP claim rules and claim transformations.

Register AD FS in Appsmith​

The validated setup imports the AD FS metadata as XML through Appsmith's SAML settings.

Find the federation metadata URL​

Find the address in AD FS Management before opening or downloading the XML:

  1. Open AD FS Management > Service > Endpoints.

  2. Under Metadata, locate the entry with type Federation Metadata. Its path is normally /FederationMetadata/2007-06/FederationMetadata.xml. Verify that the endpoint is enabled. Follow your organization's policy before changing endpoint exposure.

  3. To find the hostname, select Service and open Edit Federation Service Properties. Read Federation Service name, for example fs.example.com. This is the service name configured for AD FS, not necessarily the Windows server's computer name.

  4. Combine https://, the federation service name, and the metadata path:

    https://fs.example.com/FederationMetadata/2007-06/FederationMetadata.xml

In the screenshot lab, the service name is fs.adfs.lab.test, so the metadata URL is https://fs.adfs.lab.test/FederationMetadata/2007-06/FederationMetadata.xml.

The Federation Service identifier, commonly ending in /adfs/services/trust, identifies the IdP. It is not the metadata download URL. See Microsoft's AD FS endpoint mapping for where these values appear in AD FS Management.

Import the metadata XML​

  1. In a browser that trusts AD FS, open its federation metadata URL. Replace the hostname with your federation service name:

    https://fs.example.com/FederationMetadata/2007-06/FederationMetadata.xml
  2. Copy the entire XML document. If the browser downloads it, open the file in a text editor. Exclude the browser's message about missing style information and include the opening and closing XML elements. Use metadata obtained from your trusted AD FS service or administrator.

AD FS federation metadata XML opened in a browser
Copy the complete federation metadata XML, without the browser's introductory message.
  1. Return to Appsmith > Admin Settings > Authentication > SAML 2.0.
  2. Under Register Identity Provider, select the XML tab and paste the document into Metadata XML. The Metadata URL field expects a URL, not XML content.
  3. Set Provider name to AD FS, or another label that users will recognize on the login button.
  4. Leave Advanced > Claims blank for this basic email-based login. The two AD FS rules already provide the email and Name ID. This section is for additional custom claims, not the AD FS rule definitions.
  5. Click Save & Restart and wait for Appsmith to become available again.
Appsmith SAML configuration with the XML tab selected, AD FS metadata pasted, and the provider name entered
Register AD FS through Appsmith's SAML settings and save the configuration.
Metadata URL alternative

Appsmith also accepts an AD FS Metadata URL. For this method, Appsmith's server must be able to resolve and reach the AD FS HTTPS endpoint and trust its certificate chain. A successful fetch in your browser does not prove the container has the same DNS and trust configuration. Importing XML avoids that metadata fetch; the browser still needs to reach and trust AD FS during login.

Verify login​

  1. Keep a working Appsmith administrator session available. Close any existing private browsing windows, then open a fresh private window in a browser that meets the prerequisites.
  2. Open Appsmith's final HTTPS address and select the SAML login button with the provider name you configured, such as Sign in with AD FS.
  3. Confirm that the browser reaches your AD FS service.
  4. Sign in with an authorized AD test user, such as testuser@example.com, and that user's AD password.
  5. After the browser returns to Appsmith, open the user profile and verify that the email matches the test user's AD E-mail attribute.

A successful return to the intended Appsmith account confirms the SAML login. A new user may have no workspace or application access; assign the required Appsmith roles separately. This guide does not configure automatic provisioning or group-to-role synchronization.

AD FS may use Windows Integrated Authentication and select the current Windows account automatically. A private window does not necessarily force a username prompt. Confirm the returned identity and use the intended Windows test session or your organization's AD FS authentication policy when testing a different user.

Troubleshooting​

SymptomWhat to check
The AD FS wizard rejects the WebSSO URL because it uses HTTPComplete Appsmith HTTPS setup, set its final Base URL, reopen the SAML page at that HTTPS address, and copy its updated Redirect URL and Entity ID.
The browser reports NET::ERR_CERT_AUTHORITY_INVALIDCheck the issuing CA for the service named in the warning. Trust the appropriate CA chain on the computer running that browser. AD FS and Appsmith can use different CAs. On Windows, inspect Trusted Root Certification Authorities > Certificates in certlm.msc. Restart the browser after updating trust. Do not install a private key as a trust certificate.
The browser reports a certificate name or date errorVerify that the certificate SAN covers the exact hostname or IP in the URL, that the certificate is valid, and that the client's clock is correct.
AD FS reports an unknown relying party or audience mismatchCompare the relying-party identifier with the exact Entity ID shown in Appsmith. Confirm that you clicked Add in the wizard.
The response goes to the wrong host or callbackCompare the AD FS SAML WebSSO URL with Appsmith's complete Redirect URL. Check HTTPS, hostname, port, and path. Use the final public address consistently before enabling SAML.
Appsmith cannot obtain the user's emailPopulate the user's AD E-mail field. Verify the E-Mail-Addresses mapping, that the email rule precedes the Name ID rule, and that the outgoing Name ID format is Email.
Pasting XML into Appsmith failsSelect the XML tab. Paste the complete metadata document, not a browser message or just the certificate text.
Metadata URL import fails but the URL opens in a browserCheck DNS, reachability, and certificate trust from Appsmith's server. Use trusted metadata XML if server-side retrieval is unavailable.
Login fails after an AD FS signing-certificate changeObtain current AD FS metadata and update the provider through Appsmith's SAML settings. Keep signature validation enabled; the signing certificate is different from the HTTPS certificate.
Login succeeds as a different Windows userCheck whether AD FS used Windows Integrated Authentication. Verify the Appsmith profile rather than assuming a private window switched the Windows identity.
The user signs in but cannot access a workspaceCheck Appsmith invitations, user settings, and role assignments separately from SAML authentication.

See also​