Troubleshooting ConnectorAfterCreate Rule Execution on ADsource

Hi Team,

We have two separate on-premises AD sources in our environment (ADsource1 and ADsource2). Both sources are configured identically, using the same IQService server and service accounts.

Provisioning and aggregation are generally working without any issues for both sources.

I am currently testing a connector rule of type ConnectorAfterCreate (e.g. AD After Create) on ADsource2. We already have an existing AfterCreate rule configured on ADsource1, which is working as expected.

However, when I try to implement a similar rule on ADsource2 by provisioning a test account, the operation fails with the following error:

sailpoint.connector.ConnectorException: Errors returned from IQService.
Account creation rolledback due to partial success.
Create operation is successful but post script execution failed:
After script returned non zero exit code : 1

To isolate the issue, I simplified the PowerShell script to contain only the following:

"AfterCreate fired at $(Get-Date)" |
    Out-File "C:\SailPoint\IQService\Logs\aftercreate_marker.log" -Append

exit 0

However, even with this simplified script, no output file is being generated.

The rule definition currently looks like this:

{
    "script": "\r\n\t\r\nStart-Transcript -Path \"C:\\SailPoint\\IQService\\Logs\\aftercreate_debug.log\"\r\n\"AfterCreate fired at $(Get-Date)\" | Out-File \"C:\\SailPoint\\IQService\\Logs\\aftercreate_marker.log\" -Append\r\nStop-Transcript\r\nexit 0",
    "attributes": {
        "ObjectOrientedScript": "true",
        "extension": ".ps1",
        "sourceVersion": "1.0",
        "disabled": "false",
        "program": "powershell.exe",
        "timeout": "300"
    },
    "id": "a28460008d774a27aa7080ca568670c4",
    "name": "After Create",
    "created": "2026-11-04T05:11:48.744Z",
    "modified": "2026-11-05T01:18:33.550Z"
}

One interesting observation is that I can see the full rule source content being appended to the main IQService log file, rather than the script appearing to execute.

The same type of rule definition works successfully for ADsource1, which is configured on the same IQService server. I have also declared the rule under the nativeRules section of ADsource2.

Could you please help clarify what might be causing this behaviour?

In particular, I would appreciate guidance on:

  1. Whether there are any specific nativeRules configuration requirements or differences between multiple AD sources sharing the same IQService server.

  2. Where exactly I should look in the IQService logs to identify why the PowerShell script is not executing.

  3. Whether there are any additional IQService or PowerShell configuration settings that could prevent the AfterCreate script from being invoked.

Any troubleshooting suggestions or guidance would be appreciated.

Note : we have ISC

Thanks.

Hello Lalitha. Since ADsource1 works on the same IQService server, I would focus on isolating the failure on ADsource2 before changing the shared configuration.

Your rule still contains Start-Transcript and Out-File. Could you try these checks?

  1. Test with only exit 0: Remove all file operations temporarily. If it succeeds, add the logging commands back individually and check directory permissions. A failed Out-File alone would not normally cause exit code 1 if the script reaches exit 0. If exit 0 still fails, the IQService trace should help distinguish rule selection, PowerShell startup, and execution failures.
  2. Compare both sources: Verify the correct rule reference under /connectorAttributes/nativeRules, along with the IQService host, port, and TLS settings. Native scripts require TLS and an enabled ScriptExecutor, which you can check using IQService.exe -g.
  3. Check IQService tracing: Enable debug logging using:
IQService.exe -l 3 -f "C:\SailPoint\IQService\iqtrace.log"

Restart IQService with -t during a maintenance window, since both sources share it. Look for Started process, Script return code, and executePostScript, along with any PowerShell execution errors. Seeing the rule content in IQService logs does not necessarily confirm PowerShell executed it. Also, verify the account’s current state in AD before retrying.

Could you share the relevant IQTrace errors and confirm whether the exit 0 test succeeds?

Hi @punna0001

Your answer certainly helped, and we finally identified ThreatLocker as the cause. However, TL seems to have allowed the other source, possibly because it has now learned the pattern.

What I was actually trying to achieve was to implement an AfterDelete connector rule that would also remove the associated home drive as part of the AD account deletion process.

However, this exercise has raised some concerns, particularly around the connector attempting to roll back the transaction when the additional operation encounters an issue.

Is there a way to configure the connector rule to execute asynchronously? Alternatively, what options do we have to implement this in a way that ensures the additional home drive cleanup operation does not impact the primary operation (i.e. AD account deletion)?

Ideally, the home drive cleanup should be handled independently, so that any failure in that process does not cause the AD account deletion to fail or roll back.

Thanks.

Hello Lalitha. Glad you identified ThreatLocker as the cause.

I would move the home-directory cleanup out of ConnectorAfterDelete. There is no documented asynchronous option for this rule, and handling errors with try/catch and exit 0 still leaves provisioning exposed to script startup failures and timeouts.

I would suggest using ISC’s Account Deleted event trigger with a Workflow. It is FIRE_AND_FORGET, so the cleanup outcome is independent of the original provisioning operation.

For execution, you have two options:

  1. Native: Use the Workflow’s Windows Server → Execute PowerShell Script action through the Privileged Action Gateway, if available.
  2. External: Submit a cleanup job to a queue or automation service, processed independently by an on-prem worker.

A few considerations:

  • Filter by AD source and event cause, since aggregation can also generate Account Deleted events.
  • Confirm the home-directory path is available in the event payload or can be retrieved reliably, then validate it before cleanup.
  • Verify the AD account is absent before cleanup.
  • Include retries and reconciliation, since FIRE_AND_FORGET does not guarantee delivery or replay.

This keeps home-directory cleanup failures outside the AD deletion transaction without relying on the AfterDelete rule’s exit status.