Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

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 you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

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 you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.