If an operation against the target system fails, the PowerShell script must handle this correctly so that Identity Broker can correctly generate accurate logging and reporting.

Complete Failures

If an operation being handled by a PowerShell script fails completely, the exception can either be left to be handled by Identity Broker, which will report the error back; alternatively it can be retried in the PowerShell script.

Single Operation Failures

Where many singular operations are being applied to one or more entities, such as Adds, Deletes or Updates, failure can be reported on a per-entity basis.

Identity Broker makes available Failures, an empty collection which should be populated with entities that do not successfully complete the operation against the target system:

foreach ($entity in $components.InputEntities)
    # Perform an operation
    $boolIsSuccessful = ...

    if ($boolIsSuccessful -eq $false)

Is this article helpful for you?