LDAP Config find no users

I have installed Gitea version 1.15.2 on a Debian 11 server. Now I want to integrate our AD so that the users are created automatically. Unfortunately, this does not work.

I have made the following settings:

User Search Base

User filter

Admin Filter

Restricted filter

In the LDAP Browser tool from Softerra, the query works perfectly. However, the Gitea server does not find any users. The log says the following:

2021/09/23 09:06:30 …es/auth/ldap/ldap.go:451:SearchEntries() [T] Fetching attributes ‘sAMAccountName’, ‘givenName’, ‘sn’, ‘mail’, ‘’ with filter (&(objectCategory=Person)(memberOf=CN=_DEV_GIT_USERS,OU=DEV_GROUPS,DC=dev,DC=local)(sAMAccountName=*)(! (UserAccountControl:1.2.840.113556.1.4.803:=2)) and base CN=users,DC=dev,DC=local
2021/09/23 09:06:30 models/user.go:1916:SyncExternalUsers() [E] LDAP search found no entries but did not report an error. Refusing to deactivate all users