Script repository
The script returns true if the specified user or scheduled task is the initiator of the target approval request. To execute the script, use the If PowerShell script returns true condition in a scheduled task or business rule configured for the ApprovalRequest object type.
$requestorToCheckDN = "CN=Bill Smith,OU=Users,DC=company,DC=com" # TODO: modify me
# Get specified requestor GUID.
$requestorToCheck = $Context.BindToObjectByDN($requestorToCheckDN)
$requestorToCheckGUID = [Guid]$requestorToCheck.Get("objectGUID")
# Get approval requestor GUID.
$requestorGUID = [Guid]$Context.TargetObject.Requestor.Get("objectGUID")
$Context.ConditionIsMet = $requestorGuid -eq $requestorToCheckGUID
Comments 0
You must be signed in to comment.