Separate authentication, account identity, and authorization
Legacy SSO projects often begin with a protocol decision: SAML, OpenID Connect, or an authentication proxy. That choice matters, but it answers only how a user proves identity. It does not determine which local account the person should receive, whether two existing accounts belong to the same person, or what the user may do after signing in.
Before implementing the login flow, document the application’s identity model. Determine whether its effective key is a username, email address, employee number, or internal database ID. Check whether usernames can change, whether one person can have several accounts, and how historical approvals, transactions, and audit records reference those accounts. An application that treats email as a permanent identifier can behave badly when domains change, employees are renamed, or an address is later reassigned.
Prefer an immutable, non-recycled subject identifier issued by the identity provider, stored in a dedicated mapping table against the local account ID. Names and email addresses can remain synchronized attributes, but they should not be the sole identity anchor. If the upstream directory cannot provide a stable identifier, define the fallback attribute, uniqueness assumptions, collision handling, and manual review process explicitly.
Choose an account-mapping strategy deliberately
There are three common provisioning patterns. Pre-provisioning creates accounts before first access and works well where approvals, segregation of duties, or role configuration must happen in advance. Just-in-time provisioning reduces administration but can accidentally grant application access to everyone who can authenticate. Manual linking is useful for exceptional or ambiguous accounts, but it becomes costly and inconsistent when used as the default.
- Existing account matching: Match on a stable external identifier first. A verified and unique employee number may be a controlled fallback. Treat email as a migration clue, not an instruction to merge automatically.
- Collision handling: If one external identity matches several local accounts, or several identities point to one local account, stop automation and send the case to a review queue.
- Service accounts: Do not model integrations, devices, or batch jobs as employees. Use workload identities, certificates, or managed secrets, with an accountable owner and rotation policy.
- Emergency access: Keep a monitored local break-glass path for identity-provider or network outages. Protect and test its credentials, alert on every use, and include it in regular access reviews.
The highest-risk migration state is often a prolonged period in which SSO and legacy passwords both work under different disablement rules. If a phased rollout is necessary, define which populations may use each path, when local passwords will be disabled, and how support staff should diagnose mapping failures. Avoid silent account merging for convenience; an incorrect merge can expose historical records and is usually harder to reverse than a duplicate account.
Make lifecycle management reliable and reversible
The lifecycle process matters more than the successful-login demonstration. Joiners need accounts and least-privilege roles. Movers need obsolete access removed, not merely new access added. Employees on leave, departing contractors, and leavers need access suspended or terminated according to a defined policy. Updating accounts only when users next sign in cannot disable someone who will never sign in again.
Use SCIM for provisioning, attribute synchronization, and deactivation when both sides support it. For applications without a standard interface, place the necessary database procedure or administrative API behind a controlled provisioning service. The workflow should be idempotent, retryable, observable, and supported by a dead-letter queue or equivalent failure process. A temporary outage must not leave an orphaned active account, while a replayed event must not create a second user.
Define one authoritative source for each access decision. Directory groups can map to ordinary application roles, but sensitive privileges may still require an application-specific approval or additional condition. For each role, record its business purpose, approver, source group, and removal trigger. Reconciliation should identify disabled identities with active local accounts, ownerless service accounts, dormant access, and differences between directory membership and application state.
Engineer for failure, auditability, and controlled rollout
The happy path is rarely the difficult part. Test identity-provider downtime, signing-certificate rotation, clock skew, oversized group claims, renamed users, duplicate email addresses, delayed deprovisioning, and lifecycle events arriving out of order. For every case, decide whether the application will deny access, rely on a bounded cache, or require human intervention. When a failure could increase privilege, failing closed is normally the safer default.
Audit records should connect the enterprise subject identifier, local account ID, authentication outcome, mapping decision, role change, actor, and timestamp. Do not log tokens, passwords, or unnecessary personal data. The records should still let an investigator determine how access was granted, why automation made a decision, who approved an exception, and when access was removed.
Roll out first to a controlled, lower-risk group and begin with read-only or limited roles where practical. Monitor authentication failures, mapping conflicts, provisioning retries, and deactivation latency before expanding. Complete a full account reconciliation, exercise emergency access, and document rollback conditions before the final cutover. When an application contains several account sources or complex approval rules, involving an integration team that understands both identity governance and legacy application behavior can prevent a protocol implementation from becoming a long-term access-control gap.