Hanzo

Active Directory syncer

Sync users from Microsoft Active Directory to Hanzo IAM via LDAP/LDAPS.

The Active Directory syncer pulls users from Microsoft Active Directory into Hanzo IAM over LDAP or LDAPS and keeps the directory in sync.

Prerequisites

You need:

  • An Active Directory domain controller accessible via network
  • A service account with read permissions to the user directory
  • The Base DN (search base) for your user directory
  • Network connectivity on LDAP port 389 (or LDAPS port 636 for secure connection)

Configuration

To create an Active Directory syncer in Hanzo IAM:

  1. Navigate to the Syncers tab
  2. Click Add to create a new syncer
  3. Fill in the following required fields:
FieldDescriptionExample
OrganizationThe Hanzo IAM organization where users will be importedmy-org
NameA unique identifier for this syncerad-syncer
TypeSelect "Active Directory"Active Directory
ServerHostname or IP address of your AD domain controllerdc.example.com
LDAP PortLDAP port (389 for LDAP, 636 for LDAPS)389
Bind DNDistinguished name of the service accountCN=Service Account,CN=Users,DC=example,DC=com
PasswordPassword for the service accountyour-password
Base DNSearch base for usersDC=example,DC=com

Leave database-related fields (Database type, Database, Table) empty for the Active Directory syncer.

:::tip

For production environments, it's recommended to use LDAPS (port 636) for secure communication with Active Directory.

:::

Field Mappings

The syncer automatically maps Active Directory user attributes to Hanzo IAM user fields:

Active Directory FieldHanzo IAM FieldDescription
objectGUIDIdUser's unique identifier (GUID)
sAMAccountNameNameUsername (login name)
displayNameDisplayNameDisplay name
givenNameFirstNameFirst name
snLastNameLast name
mailEmailEmail address
mobilePhoneMobile phone number
titleTitleJob title
departmentAffiliationDepartment
userAccountControlIsForbiddenAccount status

:::info userAccountControl bit 2 indicates a disabled account; those users are marked as forbidden in Hanzo IAM. :::

Running the syncer

  1. Click Test Connection to verify connectivity and credentials.
  2. Toggle Is enabled and click Sync for an immediate run.
  3. The syncer fetches all user accounts under the Base DN using the filter (&(objectClass=user)(objectCategory=person)) (computers and other AD objects are excluded).

Troubleshooting

If the syncer fails to connect or retrieve users, check the following:

  • Verify network connectivity to the AD domain controller on the LDAP port
  • Ensure the Bind DN and password are correct
  • Confirm the service account has read permissions on the Base DN
  • Check that the Base DN is correctly formatted (e.g., DC=example,DC=com)
  • Verify firewall rules allow LDAP traffic from Hanzo IAM to the domain controller

How is this guide?

Last updated on

On this page