nextcloud / nextcloud/ldap_contacts_backend
Copy to address book not working - configuration issue?
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 9
- Forks
- 7
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 25
Description
Hello,
I am trying to configure this plugin with my Nextcloud 28 instance. The authentication is handled by Keycloak via OpenID Connect Login plugin. Keycloak federates the user database from my Active Directory server, and the LDAP user backend plugin should be connected directly to my Active Directory server, bypassing Keycloak.
I installed the plugin and configured it as follows (the LDAP server is running locally):
id: 0
addressBookDisplayName: mycompany
host: localhost
port: 389
agentDn: CN=CloudContacts,OU=MyCompany-Services,DC=int,DC=example,DC=com
agentPassword: mySecretPass
bases:
OU=MyCompany-Users,DC=int,DC=example,DC=com
searchAttributes:
cn
mail
telephoneNumber
attributeMapping:
EMAIL: mail
FN: cn
TEL: telephoneNumber
tEnc: none
filter:
Now, I can see my LDAP users in the contacts' menu in the top right corner of my Nextcloud user interface. Unfortunately, when I click the "Copy to address book" option, I get the Internal server error page and in the Nextcloud log system, I can see the following error:
LdapException Could not complete search with dn "CN=My Person,OU=test,OU=MyCompany-Users,DC=int,DC=example,DC=com",
query "" and filters "*". LDAP error was [-1] Can't contact LDAP server.
1. /var/www/html/nextcloud/apps/ldap_contacts_backend/lib/Service/LdapQuerent.php line 55
Symfony\Component\Ldap\Adapter\ExtLdap\Query->execute()
2. /var/www/html/nextcloud/apps/ldap_contacts_backend/lib/Service/LdapCardBackend.php line 55
OCA\LDAPContactsBackend\Service\LdapQuerent->fetchOne()
3. /var/www/html/nextcloud/apps/ldap_contacts_backend/lib/Service/AddressBook.php line 58
OCA\LDAPContactsBackend\Service\LdapCardBackend->getCard()
4. /var/www/html/nextcloud/apps/ldap_contacts_backend/lib/Controller/ContactsController.php line 83
OCA\LDAPContactsBackend\Service\AddressBook->getChild()
5. /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
OCA\LDAPContactsBackend\Controller\ContactsController->import()
6. /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
OC\AppFramework\Http\Dispatcher->executeController()
7. /var/www/html/nextcloud/lib/private/AppFramework/App.php line 184
OC\AppFramework\Http\Dispatcher->dispatch()
8. /var/www/html/nextcloud/lib/private/Route/Router.php line 315
OC\AppFramework\App::main()
9. /var/www/html/nextcloud/lib/base.php line 1069
OC\Route\Router->match()
10. /var/www/html/nextcloud/index.php line 39
OC::handleRequest()
Please guys, could you help me to fix this issue?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/Service/LdapQuerent.php line 55 and trace the failing copy flow through LdapCardBackend.php, AddressBook.php, and ContactsController.php. Reproduce the "Copy to address book" action with the supplied configuration and determine why the LDAP search cannot contact the server. Done means the contact copies without an internal server error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100