When an account is being created, IdentityNow (and the Web Services connector) tries to optimize provisioning by collapsing operations. This can lead to beforeOperation rules not firing for each individual entitlement under certain conditions.
Assuming this behavior is only observed during account creation, not on existing accounts
This is due to how IdentityNow batches provisioning changes during account creation, often combining entitlements of the same type into a single provisioning plan step.
The Web Services connector, unlike some others (e.g., AD or SCIM), does not always split entitlement operations into individual operations when provisioning a new account. This means:
If multiple role
entitlements are added, the connector might group them into a single operation.
Your beforeOperation
rule for "Add entitlement-roles"
runs only once, processing just one entitlement (usually the first one).
The other role
entitlement(s) are not processed properly unless manually split.
Solutions
Option 1: Adjust the beforeOperation
rule to handle multiple entitlements
Ensure that your beforeOperation
rule handles all entitlements of type role
in the plan step, even if only called once.
java List<Map> entitlements = (List<Map>) plan.getEntitlements(); for (Map entitlement : entitlements) { if ("role".equals(entitlement.get("type"))) { // Process each role here } }
This assumes the connector sends all requested roles in one Add entitlement-roles
step, which your rule can loop over.
Option 2: Use afterOperation
instead
If beforeOperation
proves unreliable during account creation, consider moving your logic to an afterOperation
rule instead. Sometimes the Web Services connector behaves more predictably with afterOperation
, especially during grouped operations.
Option 3: Split provisioning plans manually in a custom workflow
If you are using workflows to create accounts or orchestrate provisioning, you can split the entitlement provisioning into separate operations — though this adds complexity and is not always necessary.
Recommended Debugging Step
Add logging inside your beforeOperation
rule to print:
The number of entitlements in the plan - Their name
and type
This will confirm if all roles are being passed but not processed, or if they’re missing entirely.