Could someone please assist with the following issue?
The logic I use for creating a samAccount is (“$(idealFirstname).$(idealLastName)$(uniqueCounter)”) but it fails when the first name is 19 characters long. This occurs because Active Directory does not accept a period as the last character. According to our new logic, if the first name is 19 characters, we need to use the format firstinitial.lastname(uniqueCounter). Otherwise, it should follow the existing format of firstname.lastname(uniqueCounter).
Please adhere to the rule “Create Unique LDAP Attribute.”
You can create an one more identity attribute for idealFirstname. In that attribute use the velocity script and check if idealFirstname is more that 19 chars then take first letter of firstname else use full firstname and use the new identityAttribute in the create profile.
Yes, you can even create this samaccountname during the create provisioning policy but i believe you will anyways needs this generated samAccountname on identity Attribute level as you can then use it for other application provisioning or many other purposes.
So either you can keep it on the account creation policy and then receive it from AD during Aggregation as an identity profile or you can even also create it as an identity attribute and generate it on identity level.
But both of these processes may fails if there is a duplicate samAccountName generated so may be worth to test that scenario as well, if it fails then you will need to use the cloud rule for generating the samAccountName.