Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/10/2022 04:40 AM
So I have an AD based endpoint and the account name is being generated by the connector:
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:
What is going wrong here and how to print the correct account name i.e. adna-yogesh?
Solved! Go to Solution.
06/10/2022 06:28 AM
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
06/10/2022 10:47 AM
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(/^\[\[|\]\]$/,'')}