
AusiasS.73768 (Customer) asked a question.
Token and session cleared automatically user is locked or disabled
Hello, I'd like to have information about how to be sure active user account sessions and tokens are cleared/revoked in Okta when a user is either disabled or locked out. Is this possible?

Hi! Here is some helpful information for what happens to an account and what you can expect when the account is suspended, deactivated, or deleted:
Deactivate and delete user accounts
As for lockouts, you can see more information here as well:
Unlock an individual user account
And for specifically revoking user sessions:
Revoke all user sessions
Additionally, you could look for key EventTypes when the user is suspended, disabled or locked out. Ultimately the user cannot login in any of the above scenario. It would be possible, for extra validation, to create a workflow to allow you to revoke sessions if some of the scenarios above occur.
Clear User Sessions
I hope this helps! Thanks!
Hello Don,
Thanks for the replies. I looked through the articles you pointed out but failed to find a policy or setting to enable immadiate session expiraton and token revocation after lockouts. Seems like deactivations do it by default, but could not find the policy for the lockouts. Workflows are triggered only a set time schedule, but not dynamically and immediately triggered after a lockout. Is this a limitation of Okta perhaps?
You could do this by way of Workflow, yes. Once you detect a lockout, you could elect to "Clear User Sessions" as a follow-up card within the flow. This could be a very straightforward flow, adding in additional steps or features as desired. See below:
Hi @DonF.81354 (Customer) ,
I am looking for the same solution for the below case:
If you have any suggestions or any idea please post them here
@AusiasS.73768 (Customer)
Are you looking to clear users sessions when any of the above occurs? Please see my earlier comment, that may be helpful. You can elect to clear user sessions after a specific event. It does the following:
"Remove all active identity provider sessions. This forces the user to authenticate on the next operation. It optionally revokes OpenID Connect and OAuth refresh and access tokens issued to the user."
Is this what you are looking for? If not, please do let me know and I would be happy to help further! Thanks!