Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

How to apply filter for users to be updated by import user based on some value on Saviynt side.

abhiupadhyay
New Contributor III
New Contributor III

In my case, I have two auth sources. Source A and Source B. there can be common users in both. 

I want to restrict a user who got added by Source A to be updated by Source B. so let say for user import on Source A, I have CP3 updated for newly created user as 'A'.. now if the same user comes in user import of Source B .. it's should be skipped to be updated for any value change. 

Both sources have username as recon field. 

I believe pre-processor will work to put some additional logic for the data that has already been brough by "user import" json, so not sure if that can help. 

4 REPLIES 4

Ishan
Saviynt Employee
Saviynt Employee

You can use the USERSOURCE field in users table using preprocessor to restrict updating users which have been added as part of the 1st connection.

USERSOURCE field is populated with the connectionkey of the connection used to import the user data.

So your preprocessor query would be something like

{
  "ADDITIONALTABLES": {
    "USERS": "SELECT USERNAME, FIRSTNAME, MIDDLENAME, LASTNAME FROM USERS WHERE USERSOURCE = 'CONNECTIONKEYofSOURCEA'"
  },
  "COMPUTEDCOLUMNS": [
    "USERNAME"
  ],

"PREPROCESSQUERIES": [
    "INSERT INTO NEWUSERDATA (USERNAME, FIRSTNAME, MIDDLENAME, LASTNAME) SELECT USERNAME, FIRSTNAME, MIDDLENAME, LASTNAME FROM CURRENTUSERS CU WHERE CU.USERNAME NOT IN (SELECT USERNAME FROM NEWUSERDATA)"

]

}

 

Ishan Kamat
Technical Architect, Professional Services
SaviyntLogo.png

abhiupadhyay
New Contributor III
New Contributor III

@Ishan  Thanks very much for the quick reply. I will try the above option. One clarification : As per my understanding preprocessor run post the data is imported in users table using "importjson" .. isnt it? 

If that is the case then data will already be there in users table for all incoming users. then how pre-processor will help? 

 

Ishan
Saviynt Employee
Saviynt Employee

@abhiupadhyay  You're welcome! Preprocessor doesn't run after data is imported to users table. It pre processes the data using whatever query you add before adding it to the users table. You should use MODIFYUSERDATAJSON to add your preprocessing logic. 

Ishan Kamat
Technical Architect, Professional Services
SaviyntLogo.png

abhiupadhyay
New Contributor III
New Contributor III

thanks @Ishan  .. a simple query to delete the records ( which are from another usersource ) in preprocessor did the trick.