usernameGenerator Transform

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

Hi Sushant,

No, you cannot use the usernameGenerator transform (Sign In to Compass - Compass) to generate a unique value for any attribute. It can only be used to calculate the account ID for a source (for Active Directory, this is distinguishedName). You would need to use an attribute generator rule to calculate the other attributes. You can use the “Create Unique LDAP Attribute” rule with a pattern to generate a unique value for those other attributes.

Thanks,
Lisa Ivy

Hi @lisa.ivy, Thank you so much for responding back.

“Create Unique LDAP Attribute” does generate the unique value.

  1. Is it possible to define the multiple templates when we select this generator?
  2. Also, is there any way we can write transform and calculate the value dynamically for a template or it has to be always identity attributes or attributes from the “create profile” page?
    For eg: is it possible to use the below transform to calculate the value and pass that in the template → “template”:"$(valueFromTransform).$(lastname)$(uniqueCounter)@domain.com"

Sample Transform
{
“attributes”:{
“attributeA”:{
“attributes”:{
“attributeName”:“attributeA”,
“sourceName”:“sourceA”
},
“type”:“accountAttribute”
},
“firstInitial”:{
“attributes”:{
“begin”:0,
“end”:1,
“input”:{
“attributes”:{
“name”:“firstname”
},
“type”:“identityAttribute”
}
},
“type”:“substring”
},
“firstName”:{
“attributes”:{
“name”:“firstname”
},
“type”:“identityAttribute”
},
“value”:"#if($attributeA == ‘value1’)$firstName#{else}$firstInitial#end"
},
“type”:“static”
}

Thank you,
Sushant

Hi Sushant,

For first question – you cannot use multiple patterns with the “Create Unique LDAP Attribute” generator. It only takes 1 pattern. If you wanted to use multiple patterns, you will need to write a custom attribute generator rule.

For second question – if you’re using “Create Unique LDAP Attribute” rule, you can reference identity attributes (as you see with the $(lastname) ) - but you cannot reference a transform directly. You should create a new identity attribute for holding the transform’s value, and then you can reference that identity attribute in the generator pattern: $(customIdentityAttributeName).$(lastname)$(uniqueCounter)@domain.com

Thanks,
Lisa Ivy

1 Like

[quote=“Sushant Maharjan, post:3, topic:1404, username:Sushant”]
(valueFromTransform

@lisa_ivy
Hi Lisa,

I am facing the same situation. Do you have any sample for Custom Attribute generator rule?

Also how can we reference template format in transforms ?

Basically requirement here is to generate the proxy address based on company name

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.