Zimbra: Release 10.1.11.GA.4655.UBUNTU22_64 NETWORK edition.
Active Directory: Windows Server 2022 Standard 21H2
I am trying to configure Zimbra Auto Provisioning with Active Directory.
The goal is to have automatic synchronization of new AD users into Zimbra, but only if they are members of a specific AD group (e.g., ZimbraUsers).
I am using the domain configuration file with the following settings.
File autoprov.txt
Code: Select all
md zimbra.example.com zimbraAutoProvAccountNameMap "sAMAccountName"
md zimbra.example.com zimbraAutoProvAttrMap "sn=sn"
md zimbra.example.com +zimbraAutoProvAttrMap "description=description"
md zimbra.example.com +zimbraAutoProvAttrMap "cn=displayName"
md zimbra.example.com +zimbraAutoProvAttrMap "givenName=givenName"
md zimbra.example.com zimbraAutoProvBatchSize "20"
md zimbra.example.com zimbraAutoProvLdapAdminBindDn "CN=zimbra-sync,CN=Users,DC=example,DC=local"
md zimbra.example.com zimbraAutoProvLdapAdminBindPassword "password"
md zimbra.example.com zimbraAutoProvLdapBindDn "CN=zimbra-sync,CN=Users,DC=example,DC=local"
md zimbra.example.com zimbraAutoProvLdapSearchBase "DC=example,DC=local"
md zimbra.example.com zimbraAutoProvLdapSearchFilter "(&(ObjectCategory=person)(memberOf=CN=ZimbraUsers,CN=Users,DC=example,DC=local))"
md zimbra.example.com zimbraAutoProvLdapURL "ldap://10.0.0.10:389"
md zimbra.example.com zimbraAutoProvMode "EAGER"
md zimbra.example.com zimbraAutoProvNotificationBody "Your account has been created automatically. Your email address ${ACCOUNT_ADDRESS}."
md zimbra.example.com zimbraAutoProvNotificationFromAddress "admin@zimbra.example.com"
md zimbra.example.com zimbraAutoProvNotificationSubject "Account ${ACCOUNT_ADDRESS} auto provisioned"
ms mail.zimbra.example.com zimbraAutoProvPollingInterval "1m"
ms mail.zimbra.example.com zimbraAutoProvScheduledDomains "zimbra.example.com"
Code: Select all
zmprov < /tmp/autoprov.txt
On subsequent runs, no new accounts are added even if we put new AD users into the group.
The log always shows 0 external LDAP entries returned:
Code: Select all
2025-09-12 18:07:58,801 INFO [AutoProvision] [] autoprov - Auto provisioning accounts on domain zimbra.example.com
2025-09-12 18:07:58,830 INFO [AutoProvision] [] autoprov - 0 external LDAP entries returned as search result
2025-09-12 18:07:58,830 INFO [AutoProvision] [] autoprov - Auto Provisioning has finished for now, setting last polled timestamp: 20250912150758.804Z
2025-09-12 18:07:58,834 INFO [AutoProvision] [] autoprov - Sleeping for 60000 milliseconds.
Code: Select all
zmprov md zimbra.example.com zimbraAutoProvLdapSearchFilter "(&(objectCategory=person))"
With the group-based filter (memberOf=CN=ZimbraUsers,...) it works only once.
Manual ldapsearch with the same filter and service account returns the expected results.
How can we configure Zimbra AutoProv so that group-based LDAP filters (with memberOf) work consistently on every poll, not only on the very first run?

