This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Samaccountname generate random two-digit number

In our environment, we typically create user accounts with their first name initial and their last name. That's easy enough to create in .json. However, we also randomly generate a two-digit number (between 10 and 99) at the end of the samaccountname in order to help ensure uniqueness of usernames. Example:

User First name: John
User Last name: Doe
username: jdoe76

I don't see a method in .json format that would allow the samaccountname field to auto-generate a random number between 10-99 at the end of the username. Here's my current setup:

"Name": "samaccountname",
"Definition": {
"Type": "TextField",
"Label": "['en-us:Username', 'de-de:SAM-Account-Name', 'fr-fr:SAM nom de compte']",
"Description": "",
"DefaultValue": null,
"IsRequired": true,
"IsEnabled": true,
"isHidden": false,
"isHiddenFromRequester": false,
"Constraints": {
"MaxLength": -1,
"ForbiddenChars": null,
"ValidationRule": "",
"ValidationInformation": "",
"UniquenessConstraint": "properties/ldap/uniqueness",
"CreationRule": "<toLowerCase>(<firstLetter>({givenname}){sn})"

I'm wondering if there's some sort of syntax that would allow for something like this:

"CreationRule": "<toLowerCase>(<firstLetter>({givenname}){sn}){randInteger(10, 99)}"

Parents Reply Children
No Data