Custom Logic to generate sAMAccountName

Hello team,

We are trying to create a Generate cloud rule to obtain a unique sAMAccountName during account provisioning, the logic to calculate sAMAccountName is:

1 letter + 4 numbers such us A0000,A0001…A9999,B0000…Z9999

is there an option to gather the last account created by IDN? or maybe a method to gather all the accounts existing in AD so we can try to order the returnted list and find the last sAMAccountName used.

Any idea??

Thanks in advance,
Regards.
Bea.

@colin_mckibben Hey Colin, sorry to bother you, any idea? did you already face the same problem?

Thanks!!!

You would want to aggregate all the accounts from the source and then do something like what is outlined here (updated with your logic)

https://community.sailpoint.com/t5/IdentityNow-Articles/IdentityNow-Rule-Guide-Account-Profile-Attribute-Generator/ta-p/77347

Thanks for your answer @clstromgren !!! My problem here is that using a generator rule find the most efficiency way to get the last sAMAccountName created by IDN in order to avoid checking several sAMAccountName, do you get my point¿

There is no easy way to get the last sAMAaccountName generated from the rule/assigned to a user.

The most reliable way it to start with 0001 and iterate until you find a unique sAMAccountName.

1 Like

Thanks!!! Yes finally we create a iterator to find the next sAMAccountName available.

HI Beatriz. Would you be able to share the final rule logic here? This could help others in the future who may be facing a similar issue.

1 Like