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

Custom Username

Naveen_Talanos
Regular Contributor
Regular Contributor

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

13 REPLIES 13

rushikeshvartak
All-Star
All-Star

You need username logic or account name logic

 

https://saviynt.freshdesk.com/support/solutions/articles/43000619084-identity-lifecycle-configuratio... 


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

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

You need custom role for username field of user or you need account name for application? 


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

Hi Rushikesh,

Custom rule for username field of user.

Regards,

Naveen

Username should ideally come from trusted source. You may use data preprocessor 

https://saviynt.freshdesk.com/support/solutions/articles/43000571860-normalizing-the-identity-data-u... 

How the users are getting created? 

Refer https://forums.saviynt.com/t5/identity-governance/preprocessor-jar-file/m-p/11707/emcs_t/S2h8ZW1haWx...


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

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

You can use preprocessor as mentioned above


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

Thanks Rushikesh

I will try and update this thread.

Manu269
All-Star
All-Star

Hi Naveen,

You can achieve the ask via User Import Preprocessor feature.

Saviynt provide this feature for following connection types :

  • Active Directory

  • Database

  • LDAP etc.

Also, for more details check this Section : https://forums.saviynt.com/t5/identity-governance/preprocessor-jar-file/m-p/11707/emcs_t/S2h8ZW1haWx...

 

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

Thanks Manish

I will try and update this thread.

Regards

Naveen

Naveen_Talanos
Regular Contributor
Regular Contributor

Hi @rushikeshvartak and @Manu269 

I have achieved the scenario for imports, full and incremental.

CustomUserName.jpg

 

 

 

 

 

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

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


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

Thanks @rushikeshvartak  I will check and update the thread.