User synchronization not working anymore after the update to Winter 2021.1

Applies to

Imagicle Suites older than 2021 and updated to Winter 2021.1 that synchronize the MAC address field of users.

Description

If you update to Winter 2021.1, with user synchronization active towards the CUCM and the mac address field is synchronized, at the end of the update the user synchronization could not work anymore.

Two different behaviors may be reported, related to two different problems:

Problem A:  users' synchronization silently fails (no errors reported). Pressing the "Synch now" button, from the web page, nothing happens and no errors are returned. This problem has been fixed in Winter 2021.2.

Problem B: users' synchronization fails and the following error is reported: "DB Merge error: NHibernate.Exceptions.GenericADO ...  Cannot insert duplicate key row in object 'dbo.Users' with unique index 'UQ_Users_user_DeviceName' ...  "

Causes

Two different causes apply for the two mentioned problems:

A) In Winter 2021 the DB field user_mac has been renamed into user_DeviceName but some references to the old name may still be present in the configuration files.

B) In Winter 2021 a uniqueness constraint has been introduced to prevent two or more users having the same devicename configured in the Imagicle suite. This is done to avoid ambiguous configurations (each device can be assigned to maximum one user).

Solution

Problem A

Update to Winter 2021.2 or higher versions, that fix this issue.

Alternatively, go through the following steps:

1) Edit the file Stonevoice\Apps\FW\Settings\CcmAdapterRules.script.settings.config.xml and replace any occurrence of "user_mac" with "user_devicename", then save the file.

2) Only for systems running a customized synchronization script: 

3) Synchronize the users again.

Problem B

1) Identify the problematic users, that is the users having the same devicename assigned. The first problematic devicename is reported in the error message.
Alternatively, you can identify all problematic users running the following SQL query:

SELECT userId,associatedDevice1 AS Devicename FROM CCMUsers WHERE associatedDevice1 IN 
(SELECT associatedDevice1 FROM CCMUsers GROUP BY associatedDevice1 HAVING COUNT(*)>1)

2) Fix the devices association in the CUCM ensuring each device is associated at most to one end-user. 

3) In the Imagicle suite remove the devicename value to the problematic users and save them again.

4) Synchronize the users again.
 



Article ID: 812
Last updated: 30 Jan, 2021
Revision: 6
Imagicle UC Suite for Cisco UC -> FAQ and Solutions -> User synchronization not working anymore after the update to Winter 2021.1
https://kbp.imagicle.com/kb/entry/812/