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

shivanshtya
Mega Expert

Hi @swathi55 ,

A good approach is to avoid using the ServiceNow sys_id as the cross-environment identifier for Azure users, since sys_id is instance-specific.

For the Azure integration, use the Azure AD/Entra Object ID as the stable external identifier and store/map it on sys_user (for example, u_azure_object_id). The integration can then use this value to find and update the correct user record.

For example:

Azure Object ID → sys_user.u_azure_object_id → ServiceNow sys_id

During code migration, avoid hard-coded user sys_ids. Instead, resolve the user dynamically using the stable Azure identifier.

For cloning, also review any integration properties, scripts, flows, ACLs, or reference fields that currently depend on environment-specific sys_ids.

This provides a much more reliable approach for Azure user reconciliation across cloned environments and deployments.

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

Thank You
Shivansh