# sAMAccountName Generator

**URL:** <https://developer.sailpoint.com/discuss/t/samaccountname-generator/820>\
**Category:** SHF Discussion and Questions\
**Created:** [June 23, 2021, 1:16pm UTC](https://developer.sailpoint.com/discuss/t/samaccountname-generator/820 "2021-06-23T13:16:53Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![chrisp](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@chrisp](https://developer.sailpoint.com/discuss/u/chrisp)\
**Post date:** [October 28, 2021, 7:10pm UTC](https://developer.sailpoint.com/discuss/t/samaccountname-generator/820/14 "2021-10-28T19:10:24Z")

</div>

Has anyone been able to generate a sAMAccountName using the usernameGenerator transform?

I found a different topic where is was mentioned that this could only be used for the account ID for a source, and for AD that is the distinguishedName.

> [@usernameGenerator Transform](https://developer.sailpoint.com/discuss/t/usernamegenerator-transform/1404):
>
> Hello, Can we use “usernameGenerator” type transform to generate the unique value for any attribute like userPrincipalName, mail that’s present on the “create profile” page, or are there any limitations on the attribute on which we can use that type of transform? Thanks, Sushant

Check the solution by lisa.ivy.

We have a need to generate the DN and the sAMAccountName, with different patters, and using the uniqueCounter. Can we use the usernameGenerator transform for both attributes?

Thanks,  
Chris

---

_[View the full topic](https://developer.sailpoint.com/discuss/t/samaccountname-generator/820)._
