making the 'User id' field non-unique in sys_user table

udaykulal
Giga Contributor

Our customer hasLDAP user data coming from 2 different domain controllers. Hence we have 2 LDAP connections. Problem is, the some of the users LDAP1 has the same user id as user id2. I can not use email id as unique key as all the users do not have email id. We are also using LDAP for authentication hence i can not put only AD user id in the 'user id' field of sys_user table.

Hence I have arrived at the solution that, instead of user id being unique, i will use combination of 'Company' and 'User ID' as the unique field (coalesce) while importing the record via transform map.

As part of this exercise I have to make user id field non-unique and add combination of 'Company' and 'User Id' as unique.

As a first step i went to the personalize dictionary for user id field and unchecked the unique check box. However even then   i am unable to save a record with same user id. It is throwing the unique index voliation error for 'user_name'.

Do i have to remove the index for user_name field from sys_user table properties. I do not have access to delete the index record anyway?

ALso i have to add combination of user id and company as a unique. How to achieve this ?

find_real_file.png

find_real_file.png

Regards

Uday

4 REPLIES 4

Michael Fry1
Kilo Patron

I would recommend you continue searching for another solution as having duplicate user_id's can cause unexpected results. I've seen log-in issues, notification problems, as well as access ticket information.


Yes, Even I was thinking about since yesterday as user id is the primary key in many places.


I am also using LDAP for authentication. in my understanding, i do not have any other option in Service-Now. I am only left with asking the customer to put a suffix on those duplicated user ids in their AD,   is there any other option you can think of?



Regards


Uday


So duplicate records in both LDAPs, but isn't the data the same on the duplicate records? Coalesce on the samaccount so one creates the account, one can update it, but it doesn't matter as the data should be the same.


I also see another challenge. even if I manage to insert duplicate user ids in the user table, If I have to use LDAP Authentication, there is no way I can use duplicate user ids with different company as i can only pass user name and password in the login screen.