diff --git a/authentik/sources/ldap/sync/groups.py b/authentik/sources/ldap/sync/groups.py index af97703feb..b2d083d270 100644 --- a/authentik/sources/ldap/sync/groups.py +++ b/authentik/sources/ldap/sync/groups.py @@ -41,7 +41,10 @@ class GroupLDAPSynchronizer(BaseLDAPSynchronizer): continue attributes = group.get("attributes", {}) group_dn = flatten(flatten(group.get("entryDN", group.get("dn")))) - if self._source.object_uniqueness_field not in attributes: + if ( + self._source.object_uniqueness_field not in attributes + and self._source.object_uniqueness_field + ): self.message( f"Cannot find uniqueness field in attributes: '{group_dn}'", attributes=attributes.keys(), diff --git a/authentik/sources/ldap/sync/users.py b/authentik/sources/ldap/sync/users.py index ba12d74274..9c4a0f8313 100644 --- a/authentik/sources/ldap/sync/users.py +++ b/authentik/sources/ldap/sync/users.py @@ -43,7 +43,10 @@ class UserLDAPSynchronizer(BaseLDAPSynchronizer): continue attributes = user.get("attributes", {}) user_dn = flatten(user.get("entryDN", user.get("dn"))) - if self._source.object_uniqueness_field not in attributes: + if ( + self._source.object_uniqueness_field not in attributes + and self._source.object_uniqueness_field + ): self.message( f"Cannot find uniqueness field in attributes: '{user_dn}'", attributes=attributes.keys(),