- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 09:35 PM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 10:02 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 09:46 PM - edited 06-24-2025 09:48 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 09:55 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 10:02 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 09:48 PM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader