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

Method to get userkey based on username ( Users class ) - Email Template

ronit
New Contributor
New Contributor

Hi,

When we use the below:

${com.saviynt.ecm.identitywarehouse.domain.Users.get('235507').email}

We are able to send the email, where 235507 is the USERKEY

Is there a way to fetch the userKey when we only know the Username ?

Can we use any method any method under the Users class which gives us the userkey based on the username which can be used in the statement provided below to send an email ?

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

${com.saviynt.ecm.identitywarehouse.domain.Users.get('235507').id}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi Rushikesh,

Thank you for responding.

I actually wanted to know on how do we get the USERKEY based on only the username.

Is there any method which we can call on the Users class to get that info ?

In the response above, we are getting the username based on the userkey, but the ask here is the opposite.

Please let us know about this. Thanks.

${user.id}

Can you print all variables available in email template using below code

${this.binding.variables.each {k,v -> println "$k = $v" + "<" + "br" + ">"}})


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.