Workflow search query issue

Hi Experts-
I have created a workflow which uses an external trigger to get email ID and send a notification to the user.

However even when I am passing an email which does not exists in IDN tenant - the workflow seem to traverse through all the users and send notification to the first one.
In the “get list of identities” box which is essentially a search query,I am passing the email passed by trigger above “$.trigger.email” and then using it in the next step of Get-identity “$.getListOfIdentities.identities[0].id” .

This should ideally fail if the email does not exist in IDN but its not.
Wondering if anyone has faced this issue before or has any better way of implementing the same?

Hi Aditya,

Can you paste the JSON of the workflow, so that we can replicate the issue.

Thanks
Krish

Hello Aditya,

In the 2nd step of your workflow, I see that you are passing the e-mail address to the search to get a list of identities.

However, when I made similar searches using search. I found that if you specify any search query without double quotes, you would get similar result and not exact result. if you specify search query with double quotes, you would get exact result.

For example, when I had searched for an email address without double quotes that did not exist on tenant, I still get list of identities. as shown below:

When I try to search using double quotes, I get the exact result. As shown below:

I think this is the similar thing happening to your workflow. email address coming from the external trigger passed to search gives similar results and not the exact results.so workflow is not working as expected.

Try specifying the search query in the workflow in the following way so that you get an exact result and the workflow works as expected.
AMB4

1 Like

Hi @AdisharmaOz ,

Could you please upload JSON object. Also I believe the recipient email address will be something like $.getIdentity.attributes.email to get the email address.

Thanks,
Kavindar Sharma

Hi Mehul - This suggestion worked, however noticed that in case of fail scenarios the workflow used to take more time in processing. I then optimized the query like - attributes.email:"[email protected]" which reduced overall processing time and seems to work fine now :slight_smile: .
Thanks to rest of the guys for their comments as well, really appreciate :slight_smile:

Adi

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.