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

check if user email exists in workflow

Jayati1
New Contributor II
New Contributor II

Hi Team

 

There is requirement to check if user email exists in saviynt or not.

 

User will add owner email in the form which is a dynamic attribute - Approver. We need to validate if approver is valid email else auto reject. I have tries below query it is not working.

 

(com.saviynt.ecm.identitywarehouse.domain.Users.executeQuery("select u.id from users u where u.email= '${Approver}'").size()== 1)

30 REPLIES 30

NM
Honored Contributor II
Honored Contributor II

@Jayati1 use 

(dynamicAttributes.get('Approver')

Jayati1
New Contributor II
New Contributor II

yes tried this also and tried to hard-code the value as well

NM
Honored Contributor II
Honored Contributor II

@Jayati1 language selected in if else block groovy right?

Jayati1
New Contributor II
New Contributor II

yes , selected groovy

NM
Honored Contributor II
Honored Contributor II

@Jayati1 can you share logs in text file.

Jayati1
New Contributor II
New Contributor II
 

NM
Honored Contributor II
Honored Contributor II

@Jayati1 doesn't seem to find relevant log .. can you process a request and share the logs

Jayati1
New Contributor II
New Contributor II

i dont see anything specific in logs. I can share again

NM
Honored Contributor II
Honored Contributor II

Yess.

Share workflow Wiring


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

Jayati1_0-1726066504652.png

 

Can you share data analyzer value for Approver from request_access_attrs table


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

Jayati1
New Contributor II
New Contributor II

Hi @rushikeshvartak - can you please help.

Jayati1
New Contributor II
New Contributor II

its a dynamic attribute which stores email

Jayati1
New Contributor II
New Contributor II

@rushikeshvartak Approver - value is email address 

Jayati1_0-1726068088119.png

 

You can create another dynamic attribute and validate if email exists in users table or not. and then use DA2 in workflow


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

Jayati1
New Contributor II
New Contributor II

@rushikeshvartak 

I tried this workflow is still not working 

Share all configuration and validation screenshot and logs in word doc

  • DA configs 
  • Logs in text fomrat
  • data analyzer validation
  • Workflow screenshot 

 

@Jayati1  When you pasting image make sure it made large refer  https://forums.saviynt.com/t5/forum-feedback/enlarge-image-by-default/m-p/96947


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

Jayati1
New Contributor II
New Contributor II

sure. Can you please confirm if below query is correct in workflow if -else block. because it works as expected without this block.

 

(com.saviynt.ecm.identitywarehouse.domain.Users.executeQuery("select u.id from Users u where u.email='${da3}'").size()==1)

Jayati1_0-1726070239383.png

 

You dont need groovy block


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

Jayati1
New Contributor II
New Contributor II

this block is required to check if value provided by user in da3 exist in user table or not

NM
Honored Contributor II
Honored Contributor II

@Jayati1 userkey in the query is static value how are you fetching it.

You don't need userkey .. email checking is enough

 

  • As mentioned above below will be logic
  • DA 1- Approver Email
  • DA2 - Validate DA1 Email exists in users table
  • Workflow Logic - Validate DA2= TRUE then navigate worklfow

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

Jayati1
New Contributor II
New Contributor II

i tried this also-


(com.saviynt.ecm.identitywarehouse.domain.Users.executeQuery("select u.id from users u where u.email='${da3}'").size() eq 0)


(com.saviynt.ecm.identitywarehouse.domain.Users.executeQuery("select count(u.id) from users u where u.email='${da3}'").size() eq 0)


(com.saviynt.ecm.identitywarehouse.domain.Users.executeQuery("select count(u.userkey) from users u where u.email='${da3}'").size() eq 0)

Jayati1
New Contributor II
New Contributor II

DA1- Email -String

DA2-Single select from sql query -select 'Yes' as ID from users u where u.email=${DA1}

} parent attribute-DA1,Action-Mapping

 

This mapping is not working

Share config screenshot


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

NM
Honored Contributor II
Honored Contributor II

@Jayati1 add mapping as action in DA1 too

Jayati1
New Contributor II
New Contributor II

Jayati1_0-1726081406122.png

select 'Yes' as ID from users u where u.email in ('${DA1}')

Jayati1_1-1726081475019.png

 

cp28 should be in lower case


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

NM
Honored Contributor II
Honored Contributor II

@Jayati1 can you also share request page screenshot does it show blank for DA2?