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

system username generation rule

AbdulGaffar
New Contributor III
New Contributor III

Hi ,

we have created generate system username through rule in random numeric as shown below.

we have created a user manually. however, the username has only 6 digits as the name.

is there a limitation for the number of random numeric characters for generating user name.

AbdulGaffar_0-1681910350426.png

Regards,

Abdul Gaffar

 

 

 

3 REPLIES 3

dgandhi
All-Star
All-Star

Hi 

I don't see anything in the documentation

System Username Generation Rule

Use this setting to define a rule for generating system usernames. The system username is used by several applications, such as Active Directory, to uniquely identify users.

To create a new rule for registering users, click Add Rule. The System Username Rules page displays the following options:

  • Basic Config

  • Advanced Config

Basic Config: This is the default view to define a rule.To create a rule, perform the following steps:

  1. Click Add Rule.
  2. On the System Username Rules pop-up window, select Basic Rules or Advanced Config. The Basic Rules option is the default view of the System Username Rules pop-up window.
  3. Select the Users parameter from the drop-down list, such as, firstname, lastname, and city in Rule-1.
    The following Users parameters are available:
    • Random Numeric: Allows you to add random numbers in the system username.
    • Random Alphabetic Allows you to add random alphabets in the system username.
      Note: Random letters in uppercase are not supported.
    • Auto Increment: Allows you to append a numeric value as a suffix to generate the system username. The added value is the first value that is used for generating the system username for the first user. The system username generation for subsequent users is incremented by +1 and accordingly generated.
  4. Initial Char: Specify the number of characters that you want to use from the selected parameter value for the user.
  5. Action: Click + to add user parameters for the rule.
  6. Special Characters: Specify the list of special characters that can be added in the system username. The system username is generated according to the rule configured with the allowed characters. For example, !@#&. 
  7. Click Save to save the rule.
  8. To add optional rules, click Add Rule. If the Rule-1 condition fails, the optional rule is applied for generating the system username.

Examples of rules:

  • Rule with firstname, lastname, and random numeric:
    Rule 1: firstname (3) + lastname (2) + Random Numeric (2)

  • Rule with firstname, displayname, and lastname:
    Rule 2:  firstname (1) + displayname (3) lastname (2)

  • Rule with firstname, random numeric, and random alphabetic:
    Rule 3: firstname (1) + Random Numeric (3) + Random Alphabetic (3)

  • Rule with firstname, lastname, and autoincrement starting at 2;
    Rule 4: firstname (1) + lastname (2) + Auto Increment (2)

If multiple rules are defined, they are separated by #, which is stored in the database to signify the start of the next rule.

Advanced Config: Select this option to define a rule via an SQL query.
For example,

SQL
case when (users.employeetype = 'Contractor')THEN concat ('C-', users.username) ELSE users.username END  
 


For the Advanced Config option, the use of special characters is managed by the query.

Note

System username can also be generated with a combination of a custom string and username. You can also append random numbers to it, which is controlled by the sav.generatesystemuseraftersave setting in the externalConfig.properties file. When this setting is set to True, it generates a random number with the specified custom string. If the random numbers are not added, verify that this setting is present in the externalConfig.properties file and set to True.

The following is a sample SQL query to generate a systemusername with an autoincrement number after checking if MiddleName exists:

SQL
concat(users.firstname , substring('.',1,1) , users.lastname) ### CASE WHEN (users.middlename is NOT NULL) THEN concat(users.firstname , substring('.',1,1) , substring(users.middlename,1,1) , substring('.',1,1) , users.lastname) END ### concat(users.firstname , substring('.',1,1) , users.lastname , substring('1',1,1))### concat(users.firstname , substring('.',1,1) , users.lastname , substring('2',1,1))### concat(users.firstname , substring('.',1,1) , users.lastname , substring('3',1,1)
 

After creating the System Username  rule, you can use the Edit Rule button to modify an existing rule. To remove a rule, click Delete.

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

sris
New Contributor III
New Contributor III

Thanks Devang. Defining was not an issue. However it doesnt seem to take more than 6 chars for username. Hence wondering if there was a limitation for username not to exceed 6 chars

As per my understanding there is no limitation that username cannot exceed more than 6 chars.

Thanks

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.