Sync user/group/roles data from PROD to lower instances

Tejal Patil1
Tera Expert

Hello Everyone,

 

I need to synchronize user, group, and role data from our Production instance to our Dev and Test instances. Specifically, when a user, group, or role record is created in Production, it should also be created in the Dev and Test instances.

I attempted to achieve this using REST integration; however, this approach is causing issues with sysid mismatches. When a record is created in Production and then replicated to Development/Test instances using the REST POST method, it is assigned a different sysid in those instances. I've learned that any integration or transform map may lead to sysid conflicts, so this approach isn't feasible.

I am aware that the IDR (Instance Data Replication) plugin can replicate data but it is paid and is not recommended for system tables such as user, group, and role records. Since we need to automate this process, a manual import/export approach is not suitable.

 

Could anyone suggest an alternative method to automate this synchronization?

 

 

Thank you.

 

1 ACCEPTED SOLUTION

Tejal Patil1
Tera Expert

This requirement can be fulfilled using the paid ServiceNow Remote Instance Spoke. Once the proper connection is established, records can be created in lower instances. We encountered a sys_id issue, which we addressed by making necessary customizations in the transform map.

View solution in original post

15 REPLIES 15

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Tejal Patil1 

 

Better to bring all updates in excel sheet and run data source and bring new data via import set, that is sonly way then.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hello @Dr Atul G- LNG 

 

I tried creating a scheduled job that sends me user, group, and role data as an attachment in Excel/CSV format from PROD. However, when importing this data into lower instances, it requires a transform map, which leads to sysid issues.

Hi @Tejal Patil1 

 

Are these users are new in Prod or only some fields get updated?

 

If  new, then yes Sys_id will be change so in this case, use export xml way to keep sys id same

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Sandeep Rajput
Tera Patron
Tera Patron

@Tejal Patil1 You can try to use setNewGUID()/setNewGUIDValue() method to set the sys_id if a record on Dev/Test while inserting a new record during your API call.

 

var a = new GlideRecord('ticket');
a.setNewGuidValue('14018b8cdb69a6403bddf1910f961926');
a.insert();

 

Source: https://sn.jace.pro/docs/gliderecord/#setnewguid