Introduction
When an employee leaves a company, the standard offboarding ritual looks the same at thousands of organizations. An IT administrator opens Okta or Microsoft Entra ID, locates the departing worker's profile, and clicks deactivate. The assumption is immediate: the former employee is now locked out of every connected application. In reality, that assumption is often wrong. A terminated user can still refresh a browser tab, run a local script with a personal access token, or maintain an active API session long after their identity provider account has been disabled. For teams building B2B SaaS products, this gap between identity deactivation and actual access revocation is a serious security blind spot.
What Happened
The problem starts with how single sign-on works. SAML and OpenID Connect handle the initial login handshake. Once the identity provider vouches for a user, the application issues its own session, usually a stateless JSON Web Token or a long-lived cookie. The identity provider does not automatically tell the application when that user is deactivated. As a result, the application continues to trust the existing token until it expires naturally. In some cases, that window lasts 24 hours or longer. Beyond browser sessions, credentials created during employment—personal access tokens, CLI tokens, OAuth grants, and webhook secrets—often remain valid because they are validated independently of the user's employment status. If the tenant enforces SSO but still accepts password resets or social logins, a backdoor can remain open even after the primary SSO account is gone.
Why This Matters
This is not a theoretical edge case. A former engineer or sales representative with lingering access can export customer data, run reports, or trigger automated workflows using scripts that never hit the login page again. Because the breach does not involve a new login, traditional login monitoring may not flag it. The activity looks legitimate because the tokens are cryptographically valid. For SaaS vendors serving enterprise customers, this means offboarding is incomplete the moment IT clicks deactivate. Customers may believe their data is protected when it is not, creating liability and eroding trust in the platform.
Key Takeaways
- SSO login and session management are separate systems. Deactivating a user in Okta or Entra ID does not automatically invalidate tokens already issued by your application.
- Short-lived access tokens paired with stateful refresh tokens allow your backend to check membership status before issuing a new session, shrinking the window of unauthorized access.
- SCIM 2.0 deprovisioning closes the loop between the identity provider and your application, triggering an immediate revocation cascade when a user is marked inactive.
- Human-bound credentials such as personal access tokens and CLI secrets must be revoked the moment a user's membership ends, while dedicated service accounts should remain separate and auditable.
- If SSO is enforced for a tenant, password resets and social login paths should be blocked or redirected to the identity provider to prevent backdoor access.
- Regular offboarding tests—such as the open-tab test, PAT test, and WebSocket test—can reveal whether your revocation logic actually works in practice.
Conclusion
Removing a user from SSO should be the start of access revocation, not the end of it. Identity providers manage the front door, but your application is responsible for what happens after someone walks through it. By combining short-lived JWTs, SCIM-driven deprovisioning, identity-bound credentials, and strict authentication enforcement, engineering teams can turn the illusion of a kill switch into a reliable reality. For any product handling sensitive enterprise data, verifying that terminated users lose access within minutes—not hours or days—should be a core part of the security roadmap.

Discussion
Join the conversation
Thoughtful reactions, questions, and follow-up ideas help shape the next story.