Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Obtain list of emails of users in a User group for email template?

yusufw
New Contributor III
New Contributor III
I created a user group named 'Help Desk', which will consist of all the users that are on the help desk team. I will configure a task completion email, so that when an AD account is created, I want to notify everyone in the Help Desk team.
 
How can I configure a email template to send an email to everyone in the Help Desk user group? That is, set the "To" field of the email, to have a list of all user emails in the Help Desk user group. 
 
From reading https://saviynt.freshdesk.com/a/solutions/articles/43000622153, I will use this object com.saviynt.ecm.identitywarehouse.domain.Users but how do I pass the User Group to that object. 
1 REPLY 1

sk
All-Star
All-Star

Try below 

${com.saviynt.ecm.identitywarehouse.domain.Users.findAllByIdInList(com.saviynt.ecm.identitywarehouse.domain.Usergroup_users.findAllByUser_groupkey(com.saviynt.ecm.identitywarehouse.domain.Usergroups.findByUser_groupname("Help Desk")?.id)?.userkey)?.email.join(',')}

Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.