09/24/2022 11:02 AM - edited 09/24/2022 11:03 AM
Hi Experts,
Please help.
I am fairly new to Saviynt. I have a requirement to generate custom username in below pattern:
If Firstname is Jane and LastName is Doe, username should be DoeJ
But if there is another Jane Doe, username should be DoeJa
If there is third person with same name, username should be DoeJan
further.. DoeJane
then DoeJane1
then DoeJane2
and so on....
Like for many users with name Naveen Sharma, username should be like:
SharmaN
SharmaNa
SharmaNav
SharmaNave
SharmaNavee
SharmaNaveen
SharmaNaveen1
SharmaNaveen2
Is there a way I can achieve this in Saviynt ? I have done it in Oracle Identity Manager before like this:
String lastInitial = lastName.substring(0, 1);
String userName = null;
int index = 0;
int seqNumber = 0;
boolean useNextAlphabetofLastName = false;
boolean userNameGenerated = false;
while (!userNameGenerated) {
if (!useNextAlphabetofLastName) {
userName = firstName.concat(lastInitial);
useNextAlphabetofLastName = true;
} else {
userName = generateLastNameSequence(firstName, lastName, index, seqNumber);
if (userName.length() == firstName.concat(lastName).length()) {
useSequentialNumber = true;
}
}
userName = Utils.generateName(tenantName, userName);
if (UserNameGenerationUtil.isUserNameExistingOrReserved(userName)) {
index++;
if (useSequentialNumber) {
seqNumber++;
}
} else {
userNameGenerated = true;
}
}
return userName;
}
Regards,
Naveen
09/24/2022 11:31 AM
You need username logic or account name logic
09/24/2022 11:39 AM
Hi Rushikesh,
Could you please point me to exact place/option.
Thanks for the document link, but I am not able to figure as how should I formulate my requirement. Not sure if there is a way in SQL to do this
Regards,
Naveen
09/25/2022 12:52 PM
You need custom role for username field of user or you need account name for application?
09/25/2022 12:55 PM
Hi Rushikesh,
Custom rule for username field of user.
Regards,
Naveen
09/25/2022 01:02 PM - edited 09/25/2022 01:03 PM
Username should ideally come from trusted source. You may use data preprocessor
How the users are getting created?
09/25/2022 01:47 PM
Users are imported from Database through DB connection. DB doesn't have username.
Saviynt needs to generate username and provision to other applications like AD.
Regards,
Naveen
09/25/2022 02:33 PM
You can use preprocessor as mentioned above
09/25/2022 11:27 PM
Thanks Rushikesh
I will try and update this thread.
09/25/2022 09:53 PM
Hi Naveen,
You can achieve the ask via User Import Preprocessor feature.
Saviynt provide this feature for following connection types :
Active Directory
Database
Also, for more details check this Section : https://forums.saviynt.com/t5/identity-governance/preprocessor-jar-file/m-p/11707/emcs_t/S2h8ZW1haWx...
09/25/2022 11:28 PM
Thanks Manish
I will try and update this thread.
Regards
Naveen
10/16/2022 01:43 PM - edited 10/16/2022 01:52 PM
Hi @rushikeshvartak and @Manu269
I have achieved the scenario for imports, full and incremental.
I used CustomJar in Preprocessor and its working like a charm.
But there is another scenario left, if someone creates user "Jack Ma" in Saviynt directly from UI, how can I make sure that this user's username follows the same sequence and becomes "JackMa3" ?
Regards,
Naveen
10/16/2022 08:45 PM
How users are getting created using ARS - create user form if yes you can create dynamic attribute and write logic to check for username using sql case when then
10/17/2022 03:34 AM
Thanks @rushikeshvartak I will check and update the thread.