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

Validation of domain in User Email under user creation form

Padmavathi
Regular Contributor
Regular Contributor

Hi Team,

We have 3 domains under one organization. (ex: @domain1.com, @domain2.com, @domain3.com), we want to compare the domain from user form (ex: user@domain1.com) with other domains which are coming from database.

created one attribute (domains list) under identity lifecycle by Using SQL MULTISELECT got the list of domains. want to compare the attribute "domains list" with user "email attribute". 

Can anyone please suggest the validation condition for it.

Thanks in Advance!

4 REPLIES 4

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @Padmavathi 

Could you please provide more information and detailed business requirements. It would be helpful if you share the sequence of steps and expected results with an example.

Email of the user will have with a particular domain for example- xyz@domain1.com. In which attribute you want to compare this attribute. What is the purpose of using multi select attribute domain list here.

Regards,

Dhruv Sharma

Padmavathi
Regular Contributor
Regular Contributor

Hi @Dhruv_S 

Sorry for the delay. We have a requirement for validating the domains of organization with user domain. 

Please find the below sequence of steps for the requirement.

1. organization have 3 domains (org@domain1.com, org@domain2.com, org@domain3.com) which should come from db.

2. while onboarding user into that organization. under user creation form user email could be like this 'xyz@domain1.com / xyz@domain2.com / xyz@domain3.com'

3. we need to validate user domain "xyz@domain3.com" with the three domains of organization (org@domain1.com, org@domain2.com, org@domain3.com).

4. user email domain should match with any one of the organization domains. 

4. To get the organization domains from the DB, we used multi select query 

5. Created one new attribute called orgdomains in user creation form and stored the output from multi select query.

6. with the help of groovy script method ".any{}" we are able to compare  orgdomains attribute with user email attribute. Now, the problem is resolved. 

 

Thanks!

 

Can you share script 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Padmavathi
Regular Contributor
Regular Contributor

please find the script @rushikeshvartak

${(domains.split(",").any{ email.endsWith( it )})}