diff --git a/authentik/sources/ldap/sync/users.py b/authentik/sources/ldap/sync/users.py index 60e8c8ebd..8a5ce734f 100644 --- a/authentik/sources/ldap/sync/users.py +++ b/authentik/sources/ldap/sync/users.py @@ -62,6 +62,6 @@ class UserLDAPSynchronizer(BaseLDAPSynchronizer): else: self._logger.debug("Synced User", user=ak_user.username, created=created) user_count += 1 - MicrosoftActiveDirectory(self._source).sync(attributes, user, created) - FreeIPA(self._source).sync(attributes, user, created) + MicrosoftActiveDirectory(self._source).sync(attributes, ak_user, created) + FreeIPA(self._source).sync(attributes, ak_user, created) return user_count diff --git a/authentik/sources/ldap/sync/vendor/ms_ad.py b/authentik/sources/ldap/sync/vendor/ms_ad.py index b8c5c3284..a10fbf6e0 100644 --- a/authentik/sources/ldap/sync/vendor/ms_ad.py +++ b/authentik/sources/ldap/sync/vendor/ms_ad.py @@ -43,8 +43,8 @@ class MicrosoftActiveDirectory(BaseLDAPSynchronizer): """Microsoft-specific LDAP""" def sync(self, attributes: dict[str, Any], user: User, created: bool): - self.ms_check_uac(attributes, user, created) - self.ms_check_pwd_last_set(attributes, user) + self.ms_check_pwd_last_set(attributes, user, created) + self.ms_check_uac(attributes, user) def ms_check_pwd_last_set(self, attributes: dict[str, Any], user: User, created: bool): """Check pwdLastSet"""