We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Saviynt for Saviynt - USERIMPORT does not set user status

JustSalva
Regular Contributor
Regular Contributor

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:

JustSalva_1-1667987169555.png

Our import settings:

JustSalva_0-1667987126458.png

The statuskey variable mapped in the user import:

JustSalva_0-1667987004925.png

Kind regards,

@nfraternali @FCaremoli 

Matteo

5 REPLIES 5

Vinit556
New Contributor III
New Contributor III

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>

rushikeshvartak
All-Star
All-Star

Does active status getting set


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

JustSalva
Regular Contributor
Regular Contributor

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

Try using type= number for statuskey


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

JustSalva
Regular Contributor
Regular Contributor

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