Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Wrong accountname being printed in Account Creation Email

yogesh
Regular Contributor III
Regular Contributor III

So I have an AD based endpoint and the account name is being generated by the connector:

yogesh_0-1654860839949.png
where ${adminaccounttype} is a dynamic attribute on the request form and can be "da" or "adna" based on user selection.

So if my username is yogesh and I select adna on form my account name is generated as adna-yogesh. This is all working fine.

But in the endpoint level email for new account creation, the ${account_name} variable is only printed as yogesh when sent to user:

yogesh_1-1654860988472.png

What is going wrong here and how to print the correct account name i.e. adna-yogesh?

2 REPLIES 2

sahajranajee
Saviynt Employee
Saviynt Employee

Hello,

This looks expected because when the user is requesting an account, some account name would be getting generated and mapped to account name.

Accountnamerule on the connector is being used to create the full DN but this information is generated at runtime when the task is to be provisioned. 

What you could do is fetch the Dynamic attribute value on your email template and send the expected account name.

Dynamic attribute can be fetched on Task Completion email as below :

${task?.requestAccessKey?.collect{ it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('adminaccounttype')}.collect{it.attributeName.toString() + ':' + it.attributeValue}.join('###')}}

Also, ensure that your CN mapping in your createaccountjson is similar to cn part specified in the DN

 


Regards,
Sahaj Ranajee
Sr. Product Specialist

yogesh
Regular Contributor III
Regular Contributor III

Thanks Sahaj,
I used below string to extract only the dynamic attribute value and remove the square brackets around it, worked like a charm:

${task?.requestAccessKey?.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('adminaccounttype')}.collect{it.attributeValue}}.toString().replaceAll(/^\[\[|\]\]$/,'')}