Users issue in Servicenow Environments

swathi55
Tera Contributor

Hello,

 

We have integrations with Azure for user data. But the issue is we have different sysid's in different environments for user records and its creating problems during code migrations too. Now we are planning to clone lower environments. What's the best way to fix it? any best practices?

 

Thank you

5 REPLIES 5

Tanushree Maiti
Tera Patron

Hi @swathi55 

 

When clients enforce strict data segregation policies to comply with standards and regulations such as ISO 27001 and GDPR, cloning Production user data into non-production instances is often prohibited. In such scenarios, discrepancies in sys_id values for sys_user records are expected between each environment (Dev/Test/Prod).

 

This is because ServiceNow automatically generates a unique, random 32-character GUID whenever a record is created. Consequently, records created independently through Azure/ LDAP/AD imports or manual entry across Development, Test, and Production instances will have different sys_id values.

 

To avoid broken references during code migrations while maintaining compliance with the client's data segregation requirements, development practices should move away from hardcoding or directly referencing sys_id values. Instead, implement reliable, environment-independent approaches for identifying and referencing records, ensuring consistency and portability across all instances.

Thank you..But in serviceNow most of the fields like Assigned to are reference fields.How we can avoid that?  during clone should we use data preserves on sys_user table?

Hi @swathi55 

 

Yes ,  sys_user table can be preserved and excluded during the clone.

 

Chiranjeevi VR
Tera Contributor

hi @swathi55 ,

 

can you confirm on the below questions:

Are all environments connected to the same Azure Entra ID tenant?

Can we use Azure Object ID or Employee ID as a common identifier instead of sys_id?

Can we implement dynamic user lookups to eliminate hardcoded sys_id dependencies?

How will we maintain user consistency across lower environments without cloning Production data?

 

 

💡If my response helped, please mark it as correct✅and close the thread🔒— this helps future readers find the solution faster!🙏

thankyou

Chiranjeevi