Using uniqueCounter to generate mail value in AD

Hi all,
We currently utilise uniqueCounter in the following Pattern to generate mail value in AD:
$(knownAs).$(lastname)$(uniqueCounter)@domain

We have a requirement to start the uniqueCounter at 2, rather than 1, so if an account with firstname.lastname exists, it generate a mail value of firstname.lastname2 by default. Then if firstname.lastname2 exists, the next value would be firstname.lastname3, and so on.

Is there anyway to set this?

Thanks in advance, Daniel.

Hello Daniel,

No it´s not possible to modify the actual functionality for the uniqueCounter capability

1 Like

You would need a rule to accomplish this, the out of the box generator can’t be modified.

1 Like

You can use an Account Profile Attribute Generator cloud rule. Look at the attached example.

1 Like

Thanks all, much appreciated - I’ll give the Attribute Generator a go.

You just need to statically specify the patterns (no number, then with 2, then with 3…) in the array / list…I would think…:

In some cases, dumber static approach gets deployed faster. And if you need to modify it down the road, there’s less of a hurdle / hoop to get through.

Alternatively, untested, I wonder if you can have a stack of usernameGenerators inside a first valid transform…like this:
First valid {
usernameGenerator for (fl, fl2, fl3, fl4, fl5, fl6, fl7, fl8, fl9),
usernameGenerator for (fl10,fl1{counter}, maxuniquechecks 9),
usernameGenerator for (fl20,fl2{counter}, maxuniquechecks 9),
usernameGenerator for (fl30,fl3{counter}, maxuniquechecks 9)
…etc.
}

Just a thought exercise.