Configuring Single Sign-On with ADFS (SAML2)
The JAMS Web Client supports Active Directory Federation Services (AD FS) as a single sign-on Identity Provider using SAML 2.0. Users sign in to the JAMS Web Client with their Active Directory credentials through your organization's AD FS sign-in page. If you use Microsoft Entra ID, see Configuring Single Sign-On with Microsoft Entra ID (SAML2) or Configuring Single Sign-On with Microsoft Entra ID (OIDC) instead.
JAMS identifies each AD FS user by their Active Directory security identifier (SID), so an account stays the same even if the user is renamed. Active Directory group memberships are sent as SIDs in the sign-in response and are used for JAMS access control.
To configure single sign-on with AD FS, you need to complete steps on the AD FS server and in the JAMS Web Client. You will copy values between both, so keep both open during this process.
Complete the steps in all sections below to complete the setup.
Before You Begin
- Ensure you are running JAMS Web Client 7.9.5 or later. Earlier versions support AD FS only through the Custom via SAML 2.0 Identity Provider type, and do not accept the default AD FS Entity ID.
- Ensure you have AD FS 2016 or later, joined to the Active Directory domain your users sign in from.
- Ensure you have administrator rights on the AD FS server to create the Relying Party Trust and claim rules.
- Ensure you have the Configuration - Execute ACL in JAMS to create and enable Identity Providers.
- Ensure the JAMS Web Client server can reach the AD FS federation metadata URL over HTTPS and trusts the certificate AD FS presents. JAMS retrieves the metadata from the server, not from the browser. If AD FS uses a certificate issued by an internal certification authority, install that CA's root certificate in the Local Machine | Trusted Root Certification Authorities store on the JAMS Web Client server.
Values You Will Need
Decide on the following values before you start. You must use them identically, character for character, in AD FS and in the JAMS Web Client.
| Value | Description | Example |
|---|---|---|
| JAMS Web Client URL | The Gateway URL your JAMS Web Client is served at, with no trailing slash. If the site runs on the default HTTPS port (443), omit the port everywhere. | https://jams.example.com |
| Scheme | A unique name you choose for this Identity Provider. It must only contain letters, numbers, an underscore, or a hyphen, and it must start with a letter. It becomes part of the ACS URL. | adfs |
| ACS URL | The Assertion Consumer Service URL, built from the two values above: <JAMS Web Client URL>/saml2/<scheme>/Acs | https://jams.example.com/saml2/adfs/Acs |
| Metadata URL | The federation metadata URL published by AD FS. | https://adfs.example.com/FederationMetadata/2007-06/FederationMetadata.xml |
| IdP Entity ID | The Federation Service identifier declared in the AD FS metadata. By default AD FS uses the http scheme. This is expected: the Entity ID is an identifier, not a network address. | http://adfs.example.com/adfs/services/trust |
The JAMS Web Client URL must match exactly. SAML compares the URL as a plain string. https://jams.example.com and https://jams.example.com:443 are the same address to a browser, but they are different identifiers to SAML, and a mismatch causes sign-in to fail. Choose one form and use it for the JAMS Gateway URL, the AD FS Relying Party Trust identifier, and the ACS URL. The form without the port is recommended for port 443.
1. AD FS Configuration
1.1 Creating the Relying Party Trust
- On the AD FS server, open AD FS Management.
- Go to Relying Party Trusts and click Add Relying Party Trust.
- Select Claims aware and click Start.
- Select Enter data about the relying party manually and click Next.
- In the Display name field, enter JAMS Web Client (or your preferred name) and click Next.
- On the Configure Certificate step, do not configure a token encryption certificate. Click Next.
- On the Configure URL step, select Enable support for the SAML 2.0 WebSSO protocol and enter the ACS URL.
Example: https://jams.example.com/saml2/adfs/Acs - Click Next.
- In the Relying party trust identifier field, enter the JAMS Web Client URL exactly and click Add.
Example: https://jams.example.com - Click Next.
- Select an access control policy that matches your organization's policy, such as Permit everyone or a policy restricted to a JAMS users group.
- Complete the wizard.
You can create the same trust in PowerShell instead:
Add-AdfsRelyingPartyTrust -Name "JAMS Web Client" `
-Identifier "https://jams.example.com" `
-SamlEndpoint (New-AdfsSamlEndpoint -Binding POST -Protocol SAMLAssertionConsumer `
-Uri "https://jams.example.com/saml2/adfs/Acs") `
-AccessControlPolicyName "Permit everyone"
JAMS sends unsigned authentication requests. Leave the Relying Party Trust's SignedSamlRequestsRequired setting at False, which is the AD FS default. If it is set to True, AD FS rejects every sign-in request from JAMS. To check and correct it:
Get-AdfsRelyingPartyTrust -Name "JAMS Web Client" | Select-Object SignedSamlRequestsRequired
Set-AdfsRelyingPartyTrust -TargetName "JAMS Web Client" -SignedSamlRequestsRequired $false
1.2 Adding the Claim Rules
A new Relying Party Trust issues no claims until you add claim rules. Without them, the sign-in response contains no Name ID and sign-in fails. This is the most common cause of a provider that enables successfully but cannot sign anyone in.
The three rules below provide everything JAMS uses. On the AD FS server, run the following in an elevated PowerShell window. If you used a different display name for the trust, change the -TargetName value.
$rules = @'
@RuleTemplate = "LdapClaims"
@RuleName = "JAMS claims (email, name, UPN, group SIDs)"
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn", "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid"), query = ";mail,displayName,userPrincipalName,tokenGroups(SID);{0}", param = c.Value);
@RuleTemplate = "PassThroughClaims"
@RuleName = "Pass through Primary SID"
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid"]
=> issue(claim = c);
@RuleTemplate = "MapClaims"
@RuleName = "UPN to NameID"
c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"]
=> issue(Type = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", Issuer = c.Issuer, OriginalIssuer = c.OriginalIssuer, Value = c.Value, ValueType = c.ValueType, Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier/format"] = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified");
'@
Set-AdfsRelyingPartyTrust -TargetName "JAMS Web Client" -IssuanceTransformRules $rules
Set-AdfsRelyingPartyTrust -IssuanceTransformRules replaces the entire rule set on the trust. If the trust already has rules you want to keep, retrieve them first and include them in $rules:
Get-AdfsRelyingPartyTrust -Name "JAMS Web Client" | Select-Object -ExpandProperty IssuanceTransformRules
The rules take effect immediately. You do not need to restart AD FS.
| Rule | What It Sends | How JAMS Uses It |
|---|---|---|
| JAMS claims | Email address, display name, user principal name (UPN), and Active Directory group memberships as SIDs | The username and email address of the JAMS user, the user's Full Name, and the group SIDs used for access control |
| Pass through Primary SID | The user's Active Directory SID | The stable identifier for the JAMS user account |
| UPN to NameID | The user's UPN as the SAML Name ID | The required subject of the sign-in response. UPN is used because every Active Directory user has one, while the email attribute may be empty. |
To create the rules in the AD FS Management console instead, add the following rules to the trust:
- A Send LDAP Attributes as Claims rule that maps E-Mail-Addresses to E-Mail Address, Display-Name to Name, User-Principal-Name to UPN, and Token-Groups as SIDs to Group SID.
- A Pass Through or Filter an Incoming Claim rule for Primary SID.
- A Transform an Incoming Claim rule from UPN to Name ID, with the outgoing Name ID format set to Unspecified.
1.3 Noting the Federation Metadata Values
You need two values from AD FS in the 2.1 Adding the ADFS Identity Provider in the JAMS Web Client section.
- In AD FS Management, right-click Service and select Edit Federation Service Properties.
- Copy the Federation Service identifier. This is your IdP Entity ID.
Example:http://adfs.example.com/adfs/services/trust - Note the Federation Service name. Your Metadata URL is
https://<Federation Service name>/FederationMetadata/2007-06/FederationMetadata.xml.
Example:https://adfs.example.com/FederationMetadata/2007-06/FederationMetadata.xml
2. JAMS Web Client Configuration
2.1 Adding the ADFS Identity Provider in the JAMS Web Client
Before You Begin
You need the following information before starting this section:
- The scheme name, such as adfs, from Values You Will Need.
- The IdP Entity ID and Metadata URL from 1.3 Noting the Federation Metadata Values.
- Click Access from the main menu.
- Click Identity Providers.
- Click Add.
- In the Provider field, select ADFS via SAML 2.0.
- In the Scheme field, enter the scheme name you used in the ACS URL, such as adfs.
- In the Display Name field, enter the text that you want displayed as the button text on the JAMS Web Client Log in screen. For example, you can enter Company SSO.
- Click Save & Continue.
- Confirm the read-only ACS URL shown on the form exactly matches the ACS URL you entered in the AD FS Relying Party Trust.
- In the IdP Entity ID field, enter the Federation Service identifier. Copy it exactly, including the
http://scheme.
Example:http://adfs.example.com/adfs/services/trust - In the Metadata URL field, enter the AD FS federation metadata URL.
Example:https://adfs.example.com/FederationMetadata/2007-06/FederationMetadata.xml - Click Save.

If you do not want Active Directory group names displayed in JAMS, skip to 2.4 Enabling the ADFS Identity Provider in the JAMS Web Client.
2.2 Configuring Directory Sync (Optional)
AD FS sends group memberships as SIDs, and JAMS access control always evaluates those SIDs. Without Directory Sync, groups are displayed in JAMS by their SID, such as S-1-5-21-…-1105. Directory Sync lets JAMS look up the display name of each group in Active Directory over LDAP, so JAMS displays names such as JAMS Operators instead.
Directory Sync settings can only be saved while the Identity Provider is disabled.
Choosing a Bind Mode
The Bind Mode setting in the Directory Sync section controls how JAMS connects to Active Directory.
| Bind Mode | How JAMS Connects | When to Use It |
|---|---|---|
| None (default) | JAMS does not connect to Active Directory. Groups are displayed as SIDs. | The JAMS Web Client server cannot reach a Domain Controller, or SIDs are acceptable. |
| Windows Integrated | JAMS connects as the Windows identity that the JAMS Web services run under. No credentials are stored. | The JAMS Web Client server is joined to the Active Directory domain or a trusting domain. This is the recommended mode for a domain-joined server. |
| Service Account | JAMS connects with a domain user name and password that you provide. | The JAMS Web Client server is not joined to the domain, or you want lookups performed under a dedicated account. |
If the JAMS Web Client server is not joined to the Active Directory domain, Service Account is the only mode that works. Windows Integrated fails on a non-domain-joined server with "The specified domain either does not exist or could not be contacted." Entering a Domain Controller does not make Windows Integrated work on that server.
Directory Sync Fields
| Field | Description |
|---|---|
| Bind Mode | None, Windows Integrated, or Service Account. When None is selected, the other fields are hidden. |
| Domain Controller | The server JAMS connects to. Enter the domain DNS name, the fully qualified name of a Domain Controller, or its IP address. Do not enter the AD FS Federation Service name. The value must resolve from the JAMS Web Client server, not only from the Domain Controller. Maximum 256 characters, no spaces.
|
| Port | The LDAP port. The default is 3268, the Global Catalog port, which resolves groups from every domain in the forest. Use 389 to query a single domain; groups from other domains in the forest are then displayed as SIDs. Do not use the LDAPS ports 636 or 3269. |
| Username | (Service Account only) The account JAMS connects as, in the form DOMAIN\username. A standard domain user is sufficient; no privileged group membership is required. Maximum 256 characters. |
| Password | (Service Account only) Click Change to set the password in the New Password and Reenter Password fields. The password is saved as soon as you click Save in the dialog, is stored encrypted, and is never displayed again. You can save the Identity Provider without a password, but you cannot enable it until a password is set. |
JAMS signs and encrypts the LDAP connection (a sealed bind) in both Windows Integrated and Service Account modes, so credentials and directory data are not sent in clear text on port 3268 or 389. Directory Sync does not use LDAPS, so the LDAPS ports 636 and 3269 do not work.
When you save, JAMS stores only the fields the selected Bind Mode uses. Selecting None and saving removes all stored Directory Sync settings, including the stored password. Selecting Windows Integrated and saving removes any stored username and password.
Configuring Windows Integrated
- Verify the JAMS Web Client server is joined to the domain. In PowerShell, run
(Get-CimInstance Win32_ComputerSystem).PartOfDomain. It must return True. - Verify the server can locate a Domain Controller. Run
nltest /dsgetdc:<domain>, such asnltest /dsgetdc:example.com. - Ensure the JAMS Web services run as LocalSystem or as a domain account. A local Windows account cannot connect to Active Directory, and Windows Integrated fails.
- Ensure the server's DNS points at the domain.
- On the ADFS Identity Provider in the JAMS Web Client, set Bind Mode to Windows Integrated.
- Leave Domain Controller blank and Port at 3268.
- Click Save.
Configuring Service Account
- On the ADFS Identity Provider in the JAMS Web Client, set Bind Mode to Service Account.
- In the Domain Controller field, enter the domain DNS name, a Domain Controller name, or an IP address that resolves from the JAMS Web Client server.
Example:example.com - Leave Port at 3268 unless you need to query a single domain.
- In the Username field, enter the account in the form
DOMAIN\username.
Example:EXAMPLE\svc-jams-ldap - Click Save.
- Next to Password, click Change.
- In the New Password and Reenter Password fields, enter the account's password.
- Click Save in the dialog.

2.3 Testing the Directory Sync Connection (Optional)
You can test the saved Directory Sync settings before you enable the Identity Provider. The test is available from the JAMS REST API only; there is no test button in the JAMS Web Client. For how to open the Swagger page, see REST API.
The test uses the saved settings. Save any changes in the JAMS Web Client before you run it.
- Open the Swagger page on your JAMS server.
- In the Identity Providers category, expand POST /api/identity-providers/{id}/directory-sync/test.
- Click Try it out.
- In the id field, enter the identifier of the ADFS Identity Provider.
- Click Execute.
The test connects to Active Directory and looks up the built-in Domain Users group. The response contains success, resolvedGroupName, and failureReason.
| Result | Meaning |
|---|---|
success: true, resolvedGroupName: "Domain Users" | Directory Sync is working. |
| "The user name or password is incorrect." | The Service Account username or password is wrong. |
| "The server is not operational." | The Domain Controller value does not resolve, or is not reachable, from the JAMS Web Client server. |
| "The connection test timed out after 15 seconds. The Domain Controller could not be reached." | The Domain Controller did not respond. Check firewalls between the JAMS Web Client server and the Domain Controller on the configured port. |
| "The specified domain either does not exist or could not be contacted." | Windows Integrated was selected on a server that is not joined to the domain. Use Service Account instead. |
| "Directory Sync must be set to Windows Integrated or Service Account to test the connection." | The saved Bind Mode is None, or the Directory Sync settings were never saved. |
2.4 Enabling the ADFS Identity Provider in the JAMS Web Client
- Go back to the JAMS Web Client and view the ADFS Identity Provider screen.
- Click ENABLE in the top right corner of the Summary table.
JAMS retrieves the AD FS federation metadata and confirms it declares the IdP Entity ID you entered. If this check fails, see the table below.
If it succeeds, a message is displayed prompting you to restart the Identity Service for this change to take effect. When an Identity Provider is enabled, the JAMS Web Client makes the input fields read-only. To edit it again, the Identity Provider must be disabled. - Log out of the JAMS Web Client.
- Open the Windows Services manager.
- Right-click the JAMS Identity service and select Restart.
- Open a new private or incognito browser window. This avoids AD FS sessions cached from earlier attempts.
- Go to the JAMS Web Client Log in screen. A button for this Identity Provider is displayed under the or continue with label.
- Click the button, sign in with an Active Directory account, and confirm you are signed in to the JAMS Web Client.
If enabling fails, the message identifies the cause:
| Message | Cause and Fix |
|---|---|
| "The SAML2 metadata could not be retrieved from the Identity Provider Metadata URL. The endpoint could not be reached, timed out, or returned no content." | The JAMS Web Client server cannot reach the Metadata URL, or does not trust the AD FS certificate. Verify DNS and HTTPS access from the JAMS Web Client server, and install the issuing CA's root certificate in its Trusted Root store. |
| "The Identity Provider Metadata URL did not return valid SAML2 metadata. The document is not a SAML2 metadata document or is missing the required IdP SSO configuration." | The Metadata URL points at the wrong document. Use https://<Federation Service name>/FederationMetadata/2007-06/FederationMetadata.xml. |
| "The SAML2 metadata does not declare the configured IdP Entity ID '{entityId}'. The metadata declares: {found}." | The IdP Entity ID field does not exactly match the metadata. Disable the provider, copy the value listed after "The metadata declares:" into the IdP Entity ID field, and save. This value usually starts with http://, not https://. |
| "The Identity Provider IdP Entity ID must be a valid HTTP or HTTPS URL, or a URN." | The IdP Entity ID is not an absolute http://, https://, or urn: identifier. |
| A Directory Sync field message, such as "The Domain Controller must be supplied when the Service Account bind mode is selected." | The Service Account settings are incomplete. Supply the Domain Controller, Username, and Password. |
What JAMS Creates at First Sign-In
The first time a user signs in through AD FS, JAMS creates a JAMS user for them:
- External ID: The user's Active Directory SID, from the Primary SID claim.
- Username: The user's email address. If the user has no email address, the UPN is used.
- Full Name: The Active Directory displayName attribute. Accounts without one have an empty Full Name.
The username and email address are set at first sign-in only. Later changes in Active Directory do not rename the existing JAMS user.
3. Granting Access with Active Directory Groups
Grant access to Active Directory groups the same way as for any other user or group, by adding Access Control Entries. See Access Control.
- Group membership comes from the group SIDs in each sign-in response, and permissions are always evaluated by SID. Directory Sync affects only how group names are displayed. If Active Directory is unavailable, permissions are unaffected.
- Changes to a user's group membership in Active Directory take effect at the user's next sign-in.
Troubleshooting
| Symptom | Cause and Fix |
|---|---|
| Sign-in reaches AD FS, then JAMS displays "Sign-In Response Not Usable". | The Relying Party Trust has no claim rules, or the Name ID rule is missing. Apply the rules in 1.2 Adding the Claim Rules, then retry in a new private browser window. |
| Sign-in fails and the AD FS event log shows an audience or identifier error. | The Relying Party Trust identifier and the JAMS Web Client URL differ, often only by an explicit :443. Make the strings identical. |
| Group permissions do not apply. | Confirm the claim rule includes tokenGroups(SID) and that the Access Control Entries reference the same groups. Ask the user to sign in again after group changes. |
| Groups are displayed as SIDs instead of names. | Expected when Bind Mode is None, when Active Directory is unreachable, or for groups that cannot be resolved, such as deleted groups or groups from another domain on port 389. See 2.2 Configuring Directory Sync (Optional) and test the connection. |
| Sign-in is slow by about two seconds. | Directory Sync could not reach Active Directory and waited before falling back to SIDs. Sign-in is never blocked by directory availability. Test the connection to find the cause. |
| After a server restart, the Log in screen shows a 502 error. | The JAMS Web services started before SQL Server was available. Restart the JAMS Web services, and configure them to depend on SQL Server (and SQL Server Browser for a named instance). |
| Sign-in behaves the same way despite configuration changes. | AD FS keeps a session cookie in the browser. Retest in a new private or incognito window. |
Known Limitations
- Single Log-Out is not supported. Signing out of the JAMS Web Client ends the JAMS session only. The AD FS session remains until it expires or the user signs out of AD FS.
- IdP-initiated sign-on is supported. A user who starts from the AD FS sign-on page (
idpinitiatedsignon.htm) is signed in to the JAMS Web Client. JAMS converts the request into a standard JAMS-initiated sign-in automatically. - Group memberships from another Active Directory forest are not available. AD FS sends only the memberships known to the user's own forest. This is an Active Directory boundary, not a JAMS setting.
- Signed authentication requests are not supported. JAMS sends unsigned authentication requests and has no service provider signing certificate. The sign-in response is still signed by AD FS and restricted to the JAMS Relying Party Trust.
- Only one SAML2 Identity Provider can be enabled at a time, across the ADFS via SAML 2.0, Microsoft Entra ID via SAML 2.0, and Custom via SAML 2.0 types.