We have a issue in deleting AD user objects which is having dependency like child objects in AD.
We have tried adding DeleteSubtree in delete provisioning policy but the still seeing error like below
[2026-09-01_03-12-24AM] upstreamErrorMessage is '[Error occurred while deleting the account CN=Joe Camiolo,OU=SB-Terminations,OU=Users,OU=Accounts,OU=TestOU,DC=**,DC=ORGThe directory service can perform the requested operation only on a leaf object. The directory service can perform the requested operation only on a leaf object. 00002015: UpdErr: DSID-031A121E, problem 6003 (CANT_ON_NON_LEAF), data 0 00002015: UpdErr: DSID-031A121E, problem 6003 (CANT_ON_NON_LEAF), data 0 . HRESULT:[0x80072015]. In order to delete a non-leaf object, ‘deletesubtree’ argument must be set as true in the account/object request.] ’
Tried through before delete rule to delete child objects before and let sailpoint execute the user object deletion naturally but seeing error “Access is denied” in before delete rule but when we try with same service account to delete the child objects through prowershell command prompt, then child objects are deleted.
Start with the Delete provisioning policy and try deleteSubTree with a Boolean value of true (reference).
If CANT_ON_NON_LEAF remains, use an AD Before Delete rule (ConnectorBeforeDelete) with a local IQService script to add deletesubtree=true as an AttributeRequest to the delete AccountRequest. This approach has been confirmed working for the same ISC AD error (reference, rule documentation).
For the Access is denied error, check which account the IQService PowerShell session is using. A script working manually with the AD source account does not necessarily mean the IQService script has the same permissions (IQService prerequisites).
Also confirm that the account performing the recursive delete has AD Delete Subtree (ADS_RIGHT_DS_DELETE_TREE) permission on the object. Without it, the tree delete can fail with access denied (Microsoft).
Can someone please guide us on how to get the provisioning plan in the before delete rule so that the attribute request of deletesubtree = true could be set.
Hello Kartheek. You do not get a full ProvisioningPlan in ConnectorBeforeDelete. IQService passes the delete AccountRequest as $env:Request, so modify that request directly.
SailPoint documents this read/modify/write-back pattern for IQService before scripts (reference). The AD connector guide also shows deleteSubTree with Add and Boolean true (reference).
So there is no provisioning plan to retrieve here. Modify the AccountRequest directly.