10-24-2019 07:28 AM
Hello, I’ve added employee number in custom user fields of a LDAP directory then manually synced. There is no UI within CUCM that allows us to see custom user field. So I ran a SQL query in CLI, that’s not finding Employee number.
Current userID is Telephone number, we want change that to employee number. To make this change in LDAP system I have to 1st delete all the LDAP directories, then change the LDAP system and then recreate LDAP directories. It’s better to get the employee number updated in LDAP before we delete LDAP directories and recreate. We've added Employee number in AD. Please find the SQL query and attachment. Please help me to fix this.
SQL query without employeenumber:
admin:run sql select userid,firstname,lastname,telephonenumber,department,enduser.allowcticontrolflag cti,device.name,device.tkmodel, numplan.dnorpattern Primary from enduser left join enduserdevicemap on(enduser.pkid=enduserdevicemap.fkenduser) left join device on(enduserdevicemap.fkdevice=device.pkid) left join endusernumplanmap on(enduser.pkid=endusernumplanmap.fkenduser) left join numplan on(endusernumplanmap.fknumplan=numplan.pkid) where telephonenumber LIKE '1052059 %' ORDER BY telephonenumber
userid firstname lastname telephonenumber department cti name tkmodel primary
======= ========= ========= =============== ================================================ === ======= ======= =======
1052059 XYZ ABC 1052059 Enabling Functions 1052059 437 NULL
SQL query with employeenumber:
admin:run sql select userid,firstname,lastname,telephonenumber, employeenumber,department,enduser.allowcticontrolflag cti,device.name,device.tkmodel, numplan.dnorpattern Primary from enduser left join enduserdevicemap on(enduser.pkid=enduserdevicemap.fkenduser) left join device on(enduserdevicemap.fkdevice=device.pkid) left join endusernumplanmap on(enduser.pkid=endusernumplanmap.fkenduser) left join numplan on(endusernumplanmap.fknumplan=numplan.pkid) where telephonenumber LIKE '1052059 %' ORDER BY telephonenumber
Column (employeenumber) not found in any table in the query (or SLV is undefined).
admin:
10-24-2019 07:52 AM
If you use MS AD as the server type there is no need to have the employee number in the DB before you make that change without losing anything:
With all other LDAP platforms, the attribute that is mapped to User ID is the key for that account in Unified CM. Changing that attribute in LDAP will result in a new user being created in Unified CM, and the original user will be marked inactive.
https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/srnd/collab12/collab12/directry.html