Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.
100% helpful (1/1)
saikanumuri
Saviynt Employee
Saviynt Employee

Use Case

Saviynt Users were linked to old/inactive ServiceNow users because of incorrect User Link Properties. The User Link Properties are now updated. However, the links are not getting updated.

There are 2 users in ServiceNow with the same email ID, but different User IDs.
SNOWuser1 - SNOW UserID testuser@saviynt.com and email testuser@saviynt.com
SNOWuser2 - SNOW UserID testuser@scorp.com and email testuser@saviynt.com

With an initial User Link Properties set-up, the SavUser got mapped to SNOWuser1. However, even after updating the User Link Properties to ignore email, the mappings are not getting updated.


Pre-requisites

Ensure the mappings are correct

Applicable Version(s)

N/A

Solution

The reason the linking was not updating in spite of deleting the Saviynt record is because there are 2 columns added to "sys_users" table - x_saviy_iga_saviynt_id and x_saviy_iga_saviynt_user_active that store the mapped Saviynt user's ID. Once a SNOW user is mapped, the full-import job doesn't look to do the mapping again. 

Hence the following steps are required to clear the mappings and reimport the correct linkage:

  1. Create a new on-demand job under SaviyntIGA->Scheduled Jobs to "Automatically run a script of your choosing"

  2. Use the below script :

   var user = new GlideRecord('sys_user');
user.addEncodedQuery('x_saviy_iga_saviynt_idISNOTEMPTY');
user.query();
gs.info("***INFO: Deleting saviynt column for these records: " + user.getRowCount());
while(user.next())
{
user.x_saviy_iga_saviynt_id='';
user.x_saviy_iga_saviynt_user_active='';
user.update();
}

  1. Run the job to clear the mappings. Give it a few minutes to complete as there are no logs for this job (it's a temporary piece of code).

  2. Delete the Saviynt users that have the incorrect mapping issue.

  3. Re-run the full user import job.

Comments
Rosemary
New Contributor
New Contributor

Hello @saikanumuri 

In your above mentioned steps, what is step2? Where and how to delete the Saviynt user? Please elaborate more.

Thank you.

saikanumuri
Saviynt Employee
Saviynt Employee

Hi @Rosemary 

You should be able to delete the users that were imported from Saviynt by navigating to All -> SaviyntIGA -> Users. 

saikanumuri_0-1703866378355.png

 

saikanumuri_1-1703866398805.png

 

 

Rosemary
New Contributor
New Contributor

Hello @saikanumuri 

Thank you for providing the screendumps, now I see where to delete the user.

I have tried to execute the below script, it has removed mapping for all users, is this expected behavior? Actually I just want to remove the mapping for some specific user, not for all. What would be the correct script?

   var user = new GlideRecord('sys_user');
user.addEncodedQuery('x_saviy_iga_saviynt_idISNOTEMPTY');
user.query();
gs.info("***INFO: Deleting saviynt column for these records: " + user.getRowCount());
while(user.next())
{
user.x_saviy_iga_saviynt_id='';
user.x_saviy_iga_saviynt_user_active='';
user.update();
}

  1.  
Rosemary
New Contributor
New Contributor

Hello @saikanumuri 

Another issue is: even after we rerun the full user import job - "SAVIYNT_IGA: Full Import - Users", the Saviynt userID mapping didn't happen for any of the user. Currently, no SNOW user is connecting to no Saviynt user.

Rosemary_0-1704420748062.png

Please help: how to retrigger the mapping?

 

Version history
Last update:
‎06/21/2023 06:08 PM
Updated by: