After change of department/region/etc new DN (distinguishedName) is calculated via transform
new DN is pushed to AD in prov plan
Due to very specific request from customer:
beforeModify rule is triggered,
bM rule is triggering additional PS script
PS script is creating new OU based on new DN and then moving AD object/account to new DN
Considerations:
Account ID is set for objectguid, correlation is based on sAMAccountName
Network connection from IQ server to tenant is blocked
Spotted Issues:
While beforeModify rule is triggered correctly, ps script is running properly and object is moved to new OU, rest of the attributes in provisioning plan can’t be updated
Obviously ISC do not know that what is the new dn until next aggregation even if nativeIdentity is set for objectguid
After manual single account aggregation dn is refreshed and rest of the attributes are properly updated
Question:
Can i trigger single account aggregation via afterModify rule just with java bean shell without need of additional PS script that will call API?
Many thanks for support on that case
Best Regards
Radek
This is a great question. You have correctly identified the gap between what your beforeModify rule & PowerShell script can do (move the object to a new OU) and what ISC knows about the account afterward. Because ISC doesn’t refresh the DN until the next aggregation, the rest of the provisioning plan fails.
Why did it happen in the first place?
Provisioning plan execution assumes the DN in ISC matches the DN in AD.
When your PS script moves the object, ISC’s cached DN is stale.
Even if nativeIdentity is set to objectGUID, ISC won’t requery AD mid-plan.
That’s why only after a manual single account aggregation does the DN refresh and subsequent updates succeed.
Can you trigger single account aggregation in an afterModify rule?
Directly in BeanShell (afterModify): No, there isn’t a built‑in API call exposed to rules that lets you invoke aggregation. Rules operate within the provisioning engine, not the aggregation engine.
Via REST API: Yes, ISC exposes endpoints for single account aggregation (/accounts/{id}/refresh in v3). But calling those requires an API client, typically a PS script or external job.
Without external script: Not supported. BeanShell rules don’t have native methods to trigger aggregation jobs. They can manipulate provisioning plans, but they cannot launch aggregation tasks.
Hey @shahm2 !
Thanks for response and clarification.
I was wondering if it is possible to use a workflow that catches provisioning event (filtering only for dn change) and the reload account?
From what I understand, the main issue is that ISC is not aware of the DN change immediately after the move, so the rest of the provisioning plan doesn’t apply until the next aggregation refreshes the account.
As far as I know, triggering a single account aggregation directly from a rule (like afterModify) is not something ISC supports natively via BeanShell. Aggregation is usually handled as a separate process and not designed to be invoked inline during provisioning.
Because of that, calling the API (as you mentioned) or relying on a follow-up aggregation step tends to be the more common approach.
One alternative you might consider is whether the DN move can be handled entirely within the provisioning plan itself (if supported by the connector), so ISC remains aware of the change during execution.
Hi @Gxurav713
We initially plan to use classic beforeModify and keep it as simple as possible (just move objects/change dn) but issue is that dn is build from 4 different variables that can change separately from each other. That required powershell script that willl create those new OU’s based on that variables.