11-09-2022 01:44 AM - edited 11-09-2022 01:47 AM
Hi all,
We are exploiting the Saviynt for Saviynt DB connector to implement some internal automations, one of them requires to disable or enable users in saviynt; we import the users from the authoritative source without setting their statuskey (so initially it is null) and then we are trying to set the status using the Saviynt4Saviynt USERIMPORT.
The problem is that, for users that currently have the statuskey set to null, the user import does not set the status, did we miss something?
An example of the user import query:
Our import settings:
The statuskey variable mapped in the user import:
Kind regards,
Matteo
Solved! Go to Solution.
11-09-2022 02:13 AM
try this:
<dataMapping> <before-import>
</before-import>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="username">
<![CDATA[ SELECT DISTINCT
u.username AS 'username',
(case when u.enddate is null OR u.enddate >= date(now()) then '1' else '0' end) as 'ActiveStatus'
FROM
users u
WHERE u.username IS NOT NULL ]]>
</sql-query> <importsettings> <zeroDayProvisioning>true</zeroDayProvisioning> <userNotInFileAction>NOACTION</userNotInFileAction> <checkRules>true</checkRules> <buildUserMap>true</buildUserMap> <userReconcillationField>username</userReconcillationField> </importsettings> <mapper description="This is the mapping field for SAviynt Field name" defaultrole="ROLE_SAV_ENDUSER">
<mapfield saviyntproperty="statuskey" sourceproperty="ActiveStatus" type="character"></mapfield>
</mapper> <after-import description="SQL"> </after-import> </dataMapping>
11-09-2022 03:18 AM
Does active status getting set
11-10-2022 04:52 AM
Hi all,
the import does not work even if I set the status values as strings, and yes, I'm trying also to set the status as active.
I've noticed that if I restrict the import to just one user (e.g. adding " and u.username='<username value>' in the where clause) the status is set correctly for that specific user, but if the import is massive it does not set the status.
Checking the query with the data analyzer I have around 7000 users that should be either activated or inactivated but the status does not get written during the import job
11-10-2022 11:46 PM
Try using type= number for statuskey
11-14-2022 12:12 AM
Hi all,
In the end either type = number or type=character both worked. the reason why the job fails to update users only during massive import was that we reach the maximum execution time (error: maximum statement execution time exceeded).
Thank you for your support.
Matteo