Skip to content

Sync Users from Active Directory

Use directory sync to create Emakin users in advance from Active Directory or another LDAP directory, and to deactivate users who leave the directory scope. Directory sync runs in the background at a fixed interval.

Directory sync can prepare users for an Active Directory login method or for a SAML identity provider. It works without SAML, for example when users sign in with their directory password.

Before You Begin

  • The application administrator must give a directory connection a name and a sync account. See Login Services → Directory Sync Account. The Directory Sync tab is hidden in Edit Domain until such a connection exists.
  • The login method that users will sign in with must exist in the domain: an Active Directory login method, or a SAML identity provider. See Configure SAML Single Sign-On.
  • Use one provisioning source per login method. Directory sync and SCIM on the same login method deactivate each other's users.
  • Check the user count in the Emakin license. Sync stops creating or activating users when the licensed user limit would be exceeded.

Configure Directory Sync

  1. Open Edit Domain and go to Login and Security → Directory Sync.
  2. Add an entry and set the fields below.
  3. Select Save. The first run starts within the sync interval.
Field Description
Login Method The login method that provisioned users sign in with: an Active Directory login method or a SAML identity provider.
Directory Connection The host directory connection that is searched.
Enabled? Turns the sync on or off.
Base DN The directory location to search, for example OU=Staff,DC=example,DC=com. Users outside this location are treated as having left the scope.
Filter The LDAP filter that selects users. The default is (&(objectCategory=person)(objectClass=user)).
Logon Attribute The directory attribute that matches the user id of the login method. Leave it empty to use the connection's user name field for Active Directory logins, or userPrincipalName for SAML. Binary attributes such as objectGUID are written as base64.
Sync Interval (minutes) How often the sync runs. The default is 60; the minimum is 15.

For a SAML login method, the Logon Attribute must carry the same value as the identity provider's User Id Attribute. For example, use userPrincipalName when the identity provider sends the user principal name as the NameID.

What Directory Sync Does

Directory state Result in Emakin
A user is in scope Creates the user, or updates the name and e-mail address. An existing user with the same e-mail address is bound instead of duplicated, unless Link Existing Users is turned off for the SAML identity provider.
A user is disabled in the directory Deactivates the user and ends the user's sessions. Disabled users that do not exist in Emakin yet are not created.
A user leaves the scope Deactivates the user. Users are never deleted, so work items and history stay intact.
A user returns to the scope Activates the same user.

Directory sync reads the logon attribute, mail, givenName, sn, displayName, cn, and userAccountControl.

Note

As a safeguard, a run deactivates nobody when the search returns no users, or when more than half of the synced users and more than 10 users would be deactivated at once. This protects against a wrong Base DN or Filter. Correct the configuration, or check the directory, before the next run.

Verify the Sync

  1. Configure the sync with a narrow Base DN or Filter that matches a few test users.
  2. Wait for the sync interval, then confirm that the test users appear in Emakin.
  3. Sign in as a test user through the selected login method.
  4. Widen the scope after the test succeeds.

Troubleshooting

Symptom Likely cause Resolution
The Directory Sync tab is not shown No host directory connection has a sync account Ask the application administrator to configure one
No users are created Wrong Base DN or Filter, or the sync account cannot search the directory Test the values with a directory tool using the sync account
Users are created but cannot sign in The Logon Attribute does not match the login method's user id Align the attribute and run the sync again
Users are not deactivated after leaving the directory The safeguard stopped deactivation for that run Check the Base DN and Filter
Users are deactivated unexpectedly SCIM also runs on the same login method Use only one provisioning source per login method