Provision completed workflow

Hi Community,

Requirement: Enable the workflow, to send email to user whenever any AD accounts gets created(Multiple AD)
Can we trigger provision completed workflow trigger for multiple sources in a single workflow?
If yes ,

$.accountRequests[?(@.provisioningTarget == “xyz” || @.provisioningTarget == “xyz” @.provisioningTarget == “YYY” && @.accountOperation == “Create”)]

Get accounts is not giving the proper results.

Please help with any inputs how can i fix ?

Hi @nidhipriya ,
You are creating workflow to send and email notification when AD accounts gets created .
For above requirement ISC provides out of the box functionality to notify users when accounts get created on any source system .
https://documentation.sailpoint.com/saas/help/common/emails/et_newacctprovisioned.html
please check this link.
Thank you.

Hi @pavya - I knew this…
but requirements is something that we want send email using workflow as well.

Hi @nidhipriya , You can use the Compare String function to add the required application conditionally.
For example, use a Compare String to check if the source is AD—if true, then go for Send Mail. If false, nest another Compare String to check for the next source, and continue this pattern for the remaining applications.

I understand it’s more of a workaround, but this is the approach I typically follow.

Account details are specified incorrectly. Please try providing

$.trigger.accountRequests[?(@.accountOperation == "Create")].accountOperation

@sharvari - thankyou for the input ..
will try

Hi @hkhandale - Thankyou..I tried with compare string
but everytime compare string is taking false value..

Create is okay to have based on your use case description above.

@sharvari - Filter is not working , although it doesn’t show any error..
it is fetching all the accounts from AD

Try to Get the Accounts based on Account ID
Ex.

@sharvari - unfortunately it didn’t work as well

I tried “Identity” as account selection method.

  1. Provision completed - for filtering
    $.accountRequests[?(@.provisioningTarget == “XXXX” || @.provisioningTarget == “xyz” && @.accountOperation == “Create” && @.provisioningResult == “SUCCESS” )]

  2. Get accounts:

  3. define variable


Only Sometimes its picking values for email, Other values are not popping up.

  1. Body of the mail also not giving varaible values
    Hi ${name}

Account has been created for ${sourcename}
successfully.

Your account user name is : ${var}

When you use By Identity it will return you all accounts of the user. So account[0] won’t necessarily be the latest created account that you are looking for. You may probably want to search for that account using source id or name.

I am not sure about your email contents but it if its basic account data, that is available in the trigger itself, you won’t need to do a Get Accounts. If not the account selection should help you fetch the right account to get details. The filters I provided work, not sure why it’s not working on your end. Please try to refine your filter query and that should help you.

Hope this helps.

I am using below expression to store value of employeeID in def variable .
its not fetching value
“$.trigger.accountRequests[*].attributeRequests[?(@.attributeName == "employeeID")].attributeValue”

Maybe the employeeID attribute is not part of the attribute requests. You can output the trigger details directly in an email to verify the request being received. This will help you filter the data as required.

Tried all possible ways to fetch data from response

It has employeeID.

define variable :


I noticed you haven’t applied any transforms on the Define Variable action. Please apply a trim or some other basic function on it.

Then use {{$.defineVariable.EmployeeID}} in your email.

can we use regex pattern if we would like use multiple sources with pattern starting “ad”

$.accountRequests[?( @.accountOperation == “Create” && @.provisioningTarget =~/ad.*/ )@.provisioningResult == “SUCCESS” )]

You can try it with contains/anyof/subsetof/Or operator for this usecase. Please refer the filtering events link i sent earlier.

@nidhipriya Check whether the variableA returning array output. Define Variable will not handle the arrays and it leads to give you an empty output. If it is an array, your Define Variable input can parse the result but not returns anything in the output.