User Table

sandeep6
Tera Contributor

Hi Guys,

 

I was wondering is it a good idea to change the Unique flag on a sys_user table from user id to email.

Has anybody done that?

I have come across a Scenario where there are 2 users with the same user ID. Hence first has created a record in the sys_user table but second will not.

 

Cheers

Sandeep

1 ACCEPTED SOLUTION

Hi @sandeep6 ,

 

When both user ID will go for login will it create a issue is that what you meant in your reply?

Yes, it should always be unique( as user are using user id and password ) majorly for authentication

 

if you want to make email address unique (let's say you want all the user in your system to have unique email address) you can go to email field and check unique checkbox.

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

View solution in original post

5 REPLIES 5

Chaitanya ILCR
Kilo Patron

Hi @sandeep6 ,

 

No User ID should be unique (you shouldn't remove that)

if want put unique on Email that's fine but don't remove unique on User id as it's used for authentication

it should be unique

 

there should not be two user accounts with same user ID.

 

if the user have to login how can system identify which password is for which user account?

 

 

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

Hi Chaitanya,

 

Thanks for the quick reply.

Just to reiterate my conundrum is it okay to change email as a unique field instead of current user_Id?

Yes doing above will allow 2 same user ID in the instance but with 2 unique email address, When both user ID will go for login will it create a issue is that what you meant in your reply?

 

Cheers

Sandeep

Hi @sandeep6 ,

 

When both user ID will go for login will it create a issue is that what you meant in your reply?

Yes, it should always be unique( as user are using user id and password ) majorly for authentication

 

if you want to make email address unique (let's say you want all the user in your system to have unique email address) you can go to email field and check unique checkbox.

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

Ankur Bawiskar
Tera Patron
Tera Patron

@sandeep6 

Not a good idea.

Because in ServiceNow platform user_name is unique.

You can always check before inserting and append 1 in suffix

Example: abel.tuter and then abel.tuter1

Please discuss this with your customer.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader