Single sign-on with Microsoft ADFS

Learn how to set up single sign-on with Active Directory Federation Services (ADFS).

Zefi supports Single Sign-On (SSO), allowing you to manage your team’s access through your identity provider (IdP). This means your team can access Zefi without needing separate passwords. When SSO is configured, users (team members) are automatically redirected to your IdP for authentication when they sign in to Zefi.

Your IdP checks that each user is allowed to access Zefi and sends Zefi a signed SAML assertion that confirms their identity. When your account requires SSO, manage your team's access in your IdP.

1. Create the relying party trust in ADFS

  1. Open ADFS Management with administrator rights.
  2. Go to Relying Party Trusts and click Add Relying Party Trust.
  3. Choose Claims aware, then click Start.
  4. On Select Data Source, choose Enter data about the relying party manually, then enter a display name (for example Zefi).
  5. On Configure Certificate, skip the step: Zefi does not use encrypted assertions.
  6. Fill in the remaining settings:
    1. Configure URL: tick Enable support for the SAML 2.0 WebSSO protocol and paste the Single sign-on URL (ACS URL) shown in the Zefi platform.
    2. Configure Identifiers: add the Audience URI (SP Entity ID) shown in the Zefi platform, exactly as it appears.
    3. Choose Access Control Policy: Permit specific group (for example a Zefi users group) or Permit everyone.
    4. Finish, with Configure claims issuance policy for this application ticked.
  7. Set up sign-out: ask your Zefi contact for the Zefi signing certificate, then open the trust's Properties and add the certificate on the Signature tab.
  8. On the Endpoints tab, add a SAML Logout endpoint with binding POST and trusted URL https://eu.auth.zefi.ai/saml2/logout (the Single sign-on URL with idpresponse replaced by logout). Without it, sign-in works but signing out shows an ADFS error page.

2. Add the claim rules

  1. Zefi reads three attributes with these exact, case-sensitive names: email, firstName and lastName. ADFS sends long URI names by default, which Zefi does not read, so type the names by hand instead of picking them from the list.
  2. Open Edit Claim Issuance Policy on the Zefi trust and click Add Rule.
  3. Rule 1: choose Send LDAP Attributes as Claims, attribute store Active Directory, and add these rows (LDAP attribute -> outgoing claim type):
    1. E-Mail-Addresses -> email (type it), plus a second row E-Mail-Addresses -> E-Mail Address (pick it from the list; rule 2 uses it)
    2. Given-Name -> firstName (type it)
    3. Surname -> lastName (type it)
  4. Rule 2: choose Transform an Incoming Claim, with incoming claim type E-Mail Address, outgoing claim type Name ID and name ID format Email. Without it, ADFS sends no Name ID and Zefi rejects the sign-in. Users with no email address (mail attribute) in Active Directory can't sign in.

3. Connect ADFS to Zefi

Export the metadata from ADFS

  1. Download the federation metadata file from https://<your-adfs-host>/FederationMetadata/2007-06/FederationMetadata.xml and save it as an .xml file.
  2. You can give Zefi that URL instead only if it is reachable from the public internet. Most ADFS servers are internal, so uploading the file is usually the way.
  3. ADFS renews its token-signing certificate automatically, usually once a year. Each time it changes, upload the new metadata file in Zefi, or sign-ins will stop working.

Configure your Zefi account to connect with ADFS

  1. In the Zefi platform, go to Settings -> Security -> SAML Single Sign-On and turn on Enable SAML authentication.
  2. Under Identity Provider Metadata, choose File upload, select the metadata file and save.
  3. Ask your Zefi contact to link your company email domain, so that typing a work email on the Zefi login page takes users to ADFS. Until then, users sign in with the Start URL shown in Settings -> Security.
  4. Test: in a private browser window, open the Start URL, sign in on the ADFS page and check that you land in Zefi. Then sign out and check that you are back on the Zefi login page.
  5. Sign-in must start from Zefi (the login page or the Start URL). Starting from the ADFS sign-in portal is not supported.
Screenshot of a softwareScreenshot of a software

Supported features

Zefi supports the following SSO features:
Check circle icon blue
SSO configuration options:
Configure Zefi accounts to either mandate SSO for all users or allow sign-in using SSO or email and password.
Check circle icon blue
Just-In-Time account creation:
‍
Automatically create new Zefi accounts for users without existing access upon their first SSO sign-in.
Check circle icon blue
Service Provider-initiated SSO:
‍
Initiate SSO login directly from Zefi’s login page.
‍

Limitations

Zefi doesn’t support the following SSO features:
Icon x rounded red
User Deletion in SAML:
Zefi isn't notified when you revoke a user's access in your IdP. The user loses access the next time they try to sign in through SSO. To remove access immediately, delete the user from your team settings in Zefi.