Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/20/2024 08:21 AM
Hi Everyone,
We have a requirement to assign the systemusername as Username. Systemusername is generated by Saviynt based on firstname lastname which is working fine.
I have added the same logic as in mentioned for systemusername in Registeruser rule(screenshot below). But still when i import a user manually from UI this is not updating with systemusername value.
Any idea how to achieve this ?
09/20/2024 08:40 AM
copysystemusernametousername=true
09/20/2024 09:02 AM
Can you say which file is this and where to get this one ? externalconfig.properties ? @rushikeshvartak
09/20/2024 09:03 AM
@rushikeshvartak one more thing when i run the import job without username column the import fails does this change you suggested above ll resolve that issue as well ?
09/20/2024 09:03 AM - edited 09/20/2024 09:04 AM
Yes externalconfig.properties and username is mandatory
09/23/2024 03:02 AM
@rushikeshvartak I have updated this from configuration files and restarted the application. Then i imported the user from csv file from import user option but still i see the username is updated with some random numeric values.
09/20/2024 10:37 AM
Hi @sabthamis If you are not putting user name in your csv then you have to use some other attribute as reconciliation field, and for that field a value has to be there in your csv and that has to be unique for each user.
Regards,
Indra
09/23/2024 03:20 AM
Hi @sabthamis did you populate the generate username option in global config?
If you are using an attribute in register form which isn't present in CSV file it might fail the username generration
09/23/2024 03:28 AM
@NM yes i m using a field username in my input file. Also the register user rule (username rule) and systemusername generation is also configured in global setting . When I added the username field as you told and tried to import the user in saviynt the user is not importing.
09/23/2024 03:30 AM
@sabthamis if you keep username field empty as you are trying to create a new account.
Does it automatically created a user ID try once and share logs
09/23/2024 06:29 AM
the username s created as some numeric values and systemusername generated as per my logic i added.
09/23/2024 06:55 AM
09/23/2024 07:00 AM
@rushikeshvartak I have made the changes in configuration file and i imported the user from csv file. Manual user import. I have not configured any job to import the user to test it. While the file import i just kept the reconciliation field as Blank.
09/23/2024 07:03 AM
09/24/2024 07:58 AM
@rushikeshvartak in the actual user import job i use username as reconciliation field...should i try to import the user from csv with a unique attribute and use it as reconciliation field while import...?
09/24/2024 08:02 AM
Yes
09/24/2024 08:07 AM
@rushikeshvartak - I have tried with below file and used CP7 as recon field while importing. I still don't see the systemusername is copied as username
09/24/2024 08:18 AM
@rushikeshvartak I am using the below rule in Register user rule. I am using the same in systemusername generation in which it works. but getting below error in log when i use the same code for register user rule.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) at
09/24/2024 09:02 AM
@rushikeshvartak Can i use inline preprocessor to use the systemusername as username while identity is created ?
09/24/2024 09:13 AM
09/24/2024 09:15 AM
yes its defined and its working fine. the only thing is we need to use the same value for username. @rushikeshvartak
09/24/2024 09:25 AM
Can you share logs
09/25/2024 02:29 AM
@rushikeshvartak Now i can generate the username using the same code used for systemusername. But I see they both are different means its taking username and appending 1 duplicate check is done against username and system username i guess. Attached here is the log and screenshot for the same.
Code used for Username:
09/25/2024 08:13 AM
Do you have any other user with same username ?
09/26/2024 06:25 AM
No i checked it from Data analyzer only user i getting in result it the same user.
09/26/2024 06:31 AM
09/25/2024 08:15 AM
Also you have extra ) in SQL, run query from data analyzer and validate
09/26/2024 06:39 AM
Updated query which i using is below i don't see any error when running from data analyzer
09/26/2024 06:43 AM
Add all conditions with same user
09/26/2024 06:58 AM
I used the below query..I doubt if it will work since we use ### for multiple condition getting error as
Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(LOWER(REGEXP_REPLACE('Sabthami', '[^a-zA-Z]', '')), 1, 1), SUB' at line 9
09/26/2024 06:59 AM
use case when
09/26/2024 07:18 AM
@rushikeshvartak I am able to achieve it . Thanks. We can directly map the systemusername to username in global configuration which worked for my requirements.
09/26/2024 07:22 AM
Can you share configs Screenshot
09/26/2024 07:25 AM
09/26/2024 07:27 AM
Can you edit reply and also add username screenshot and logic and accept your answer as solution