Automated user provisioning: choose when to create accounts and how to recover
Compare pre-provisioning, just-in-time, event, and scheduled sync; safely recover from duplicates, delayed events, and uncertain results.
Automated user provisioning: choose when to create accounts and how to recover
Automated user provisioning creates, updates, or disables target-app accounts from approved identity and role data. Choose when to apply a change based on onboarding delay, access risk, app availability, and recovery needs. Automation does not replace the approval that decides what access a person should have.
| Pattern | Useful when | Main trade-off |
|---|---|---|
| Pre-provisioning | Access must be ready by a known start time. | Requires reliable future-state data and controls preventing early use. |
| Just-in-time (JIT) | Accounts should appear at first sign-in. | Access depends on the app being reachable and correct role data being available then. |
| Event-driven sync | Changes should propagate soon after approval. | Retries, duplicates, and out-of-order delivery must be handled. |
| Scheduled sync | A delay is acceptable and periodic correction is useful. | Access may remain stale between runs; urgent removals need a separate path. |
Build a safe pipeline
**Read an authoritative source and approval.** Identify the owner of status, start/end dates, role, and approval. A message is a trigger, not necessarily the latest state; re-read the approved source before acting.
**Calculate desired state.** Derive account activity, groups, attributes, and expiry from current approved roles and policy. Validate how target-app groups map to permissions; apply least privilege.
**Find the target account using a stable identifier.** Store the app's resource ID and a stable source identifier. Do not rely only on mutable or reusable email. Search before creating to avoid a second account for the same person.
**Apply small, approved changes.** Create or modify only the needed attributes and group memberships. Check whether a full replacement could clear fields or whether group assignment grants broader access than expected. Do not assume every SCIM feature is supported.
**Verify the stored result.** A success response is not proof that the intended access exists. Read back account status, attributes, and group membership and compare them to the desired state; leave the work incomplete if any part failed.
**Recover safely from retries and races.** Repeated events should converge on the same desired state. After a timeout, the target may already have changed: query it before retrying creation. Compare event version or source-update time so an older event cannot overwrite newer state; recalculate from the current source when inconsistent.
**Manage failures and reconciliation.** Classify authorization, validation, duplicate, and temporary network errors instead of applying one retry rule. Give exhausted failures an owner and deadline, record approved manual actions, and periodically compare source and target to find missed changes and unmanaged accounts.
IETF RFC 7644 defines SCIM as an HTTP protocol. Bulk and PATCH are optional features, and service capabilities can be discovered through ServiceProviderConfig; target implementations vary. RFC 7643 defines common User and Group schemas, but attribute behavior and support can still differ. Inspect the actual provider configuration and documentation before designing the integration.
Example: a delayed role event after termination
Suppose a person loses project access and then leaves, but a delayed pre-departure “add project member” event arrives afterward. Replaying the message as-is could restore access. Before applying it, the handler checks current source status and approval. Since the person has left, it rejects the stale event, disables or cleans up the target account, and reads back the final state. This is a hypothetical sequence, not a test of a particular provider. Set removal deadlines and emergency handling according to risk and contract requirements.
Operational checks
Are the authoritative source and approver clear, and is the automation identity limited to needed targets and actions?
Have duplicate, out-of-order, timeout, attribute-mismatch, and target outage cases been considered?
Is a stable person-to-account key used, including email change or reuse cases?
Are group-to-permission mappings and full-replacement versus partial-update behavior verified?
Is actual access checked after success, with failures, exceptions, and retries recorded?
Can urgent removal bypass the ordinary sync schedule?
Does periodic reconciliation compare approved source state with the app's real accounts and groups?
Provisioning automation cannot make the access decision for you. Combine approval policy, stable identity matching, result verification, safe recovery, and reconciliation to reduce repeated work without recreating stale or excessive access.
Sources
[RFC 7644: System for Cross-domain Identity Management Protocol](https://www.rfc-editor.org/rfc/rfc7644.html)
[RFC 7643: System for Cross-domain Identity Management Core Schema](https://www.rfc-editor.org/rfc/rfc7643.html)
[NIST SP 800-53 Rev. 5: Account Management controls](https://csrc.nist.gov/projects/risk-management/sp800-53-controls/downloads)