6.0.0-alpha12
6/12/25

[#14714] ActiveSync -> LDAP - addressbook entry cannot be created - CN (name) is missing
Summary ActiveSync -> LDAP - addressbook entry cannot be created - CN (name) is missing
Queue Turba
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester oliverafg (at) gmx (dot) de
Created 10/17/2017 (2795 days ago)
Due
Updated 10/28/2017 (2784 days ago)
Assigned 10/18/2017 (2794 days ago)
Resolved 10/28/2017 (2784 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/28/2017 10:13:15 PM Michael Rubinsky State ⇒ Resolved
 
10/18/2017 01:14:05 AM Michael Rubinsky Assigned to Michael Rubinsky
State ⇒ Assigned
Priority ⇒ 1. Low
 
10/17/2017 08:57:34 PM oliverafg (at) gmx (dot) de Comment #1
Priority ⇒ 2. Medium
Patch ⇒ No
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ ActiveSync -> LDAP - addressbook entry cannot be created - CN (name) is missing
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
Hello,

I am using a few LDAP addressbooks, a few global read only books and
one personal addressbook.

The synchronisation from LDAP to activesync devices works fine.
A new entry from the webfrontend to LDAP and the activesync clients 
works fine.
Entries on LDAP are recoginzed on the webfrontend, with the known 
"bug" that activesync devices are not aware of a change/new entry.

If I try to add a new entry on my cell phone, it isn't created in the
LDAP backend, because of a missing cn field. I use the evolution 
schema on openldap.

My relevant part of backends.local.php:

$_ldap_uid = $GLOBALS['registry']->getAuth('bare');
$_ldap_basedn = 'dc=mydomain,dc=lan';
$cfgSources['personal_ldap'] = array(
     // Disabled by default
     'disabled' => false,
     'title' => _($_ldap_uid . " addressbook rw"),
     'type' => 'ldap',
     'params' => array(
         'server' => 'ldap.mydomain.lan',
         'tls' => false,
         'root' => 'ou=' . $_ldap_uid . ',ou=Personal,ou=addressbook,' 
. $_ldap_basedn,
         'bind_dn' => 'uid=' . $_ldap_uid . ',ou=User,ou=People,' . 
$_ldap_basedn,
        'bind_password' => $GLOBALS['registry']->getAuthCredential('password'),
         'dn' => array('uid'),
         'objectclass' => array('top',
                                'person',
                                // 'turbaContact',
                                'inetOrgPerson',
                                // 'calEntry',
                               'organizationalPerson',
                                       'evolutionPerson'),
         'scope' => 'one',
         'charset' => 'utf-8',
         'version' => 3
     ),
     'map' => array(
         '__key' => 'dn',
         '__uid' => 'uid',
         // From horde.schema:
         // '__type' => 'turbaType',
         // '__members' => 'turbaMembers',
        'name' => 'cn',
        'lastname' => 'sn',
        'firstname' => 'givenname',
        'namePrefix' => 'title',
        'title' => 'businessRole',

        'photo' => 'jpegphoto',
        'birthday' => 'birthdate',
        'anniversary' => 'anniversary',
        'spouse' => 'spouseName',
        // 'children' => 'children', // still missing
         'company' => 'o',
         'department' => 'ou',
         'businessCategory' => 'businesscategory',
         'emails' => 'mail',
         'workPhone' => 'telephonenumber',
        'fax' => 'facsimiletelephonenumber',
        'companyPhone' => 'companyPhone',
        'homePhone' => 'homephone',
        'cellPhone' => 'mobile',
        'carPhone' => 'carphone',
        'pager' => 'pager',
        'radioPhone' => 'radio',
        'assistant' => 'assistantName',
        'assistPhone' => 'assistantPhone',
        'manager' => 'managerName',
        '__tags' => 'categories',
         'workAddress' => 'postaladdress',
        'workStreet' => 'street',
        'workPostalCode' => 'postalcode',
        'workCity' => 'l',
        'workProvince' => 'st',
        // 'workCountryFree' => 'c', // no LDAP backend yet
        'homeAddress' => 'homepostaladdress',
        'otherAddress' => 'otherPostalAddress',
         'notes' => 'note',
         'office' => 'roomNumber',
         'nickname' => 'displayName',
         'website' => 'labeledURI',
         'pgpPublicKey' => 'userCertificate',
         'smimePublicKey' => 'userSMIMECertificate',
        'freebusyUrl' => 'freebusyuri',
        // 'imaddress1' => 'imAddress', // no LDAP backend yet, multi value?
        // 'yomifirstname' => 'yomiFirstname' // no LDAP backend yet
        // 'yomilastname' => 'yomiLastname' // no LDAP backend yet
        // 'yomicompanyname' => 'yomiCompanyName' // NO LDAP and horde 
backend yet' but activesync attribute
     ),
     'search' => array(
         'name',
         'emails',
         'businessCategory',
         'title',
         'homePhone',
         'workPhone',
        'cellPhone',
        'carPhone',
         'homeAddress'
     ),
     'strict' => array(
         'dn', 'uid'
     ),
     'approximate' => array(
         'cn', 'name'
     ),
     'export' => true,
     'browse' => true,
);

In my Driver.php "name" maps to "fileas"

The error in the activesync log is the following: (Name Motojj Tester, 
mobile number +491222666)

58444][2017-10-15T13:56:18+02:00] I:         Motojj
[58444][2017-10-15T13:56:18+02:00] ERR: Failed to add an object: [65] 
"Object class violation" DN: 
uid=20171015135618.Bo2SEPYeqk0T6RKOjifDs4I@ash.mydomain.de,ou=oliver,ou=Personal,ou=addressbook,dc=kobosix,dc=lan (attributes: [a:7:{s:2:"sn";s:6:"Tester";s:9:"givenname";s:6:"Motojj";s:6:"mobile";s:11:"+4912222666";s:4:"note";s:1:" 
";s:4:"mail";s:2:",,";s:3:"uid";s:53:"20171015135618.Bo2SEPYeqk0T6RKOjifDs4I@ash.kobosix.de";s:11:"objectclass";a:5:{i:0;s:3:"top";i:1;s:6:"person";i:2;s:13:"inetOrgPerson";i:3;s:20:"organizationalPerson";i:4;s:15:"evolutionPerson";}}])

Let me know, if you need further logs / config files.

Thanks and regards
Oliver

Saved Queries