
MichaelaD.59436 (Customer) asked a question.
We have a few use cases where users need to switch identities constantly, and even when logging out of Okta/clearing cache/cookies, the session persists. Clearing the user sessions from the admin portal fixes it, but the users are asking if there is a way to allow them to do it so that they don't need to submit a ticket to the admins once or twice a day.
Any suggestions? Is there a setting I missed?

@MichaelaD.59436 (Customer) -- So not really.
To confirm: The action you are referring to is the More Actions > Clear Users Sessions functionality in the Admin UI.
This calls the Users API to perform a Delete method request:
https://developer.okta.com/docs/reference/api/users/#user-sessions
What this means is you have to have authn to perform the action and a regular user isn't ever going to have permissions directly to endpoints to perform administrative tasks.
You could potentially get creative assuming you have Okta Workflows.
You could do something like a "Slack" Slash command that sends to an Okta Workflow that validates its one of the "allowed users" and then performs the API call.
Or even just provide a URL to a Workflow's API endpoint that contains a query string that could be parsed and only works if its one of the users you want to reset.
https://mydomain.workflows.okta.com/api/flo/ba1f1d18d5454545455bbe9f8e3d/invoke?user=example.user@mydomain.com
This will show up as a payload:
{
"user": "example.user@mydomain.com"
}
That could be used to verify its the correct user and then run an API call to reset their sessions.
Even better would be some sort of random value that you generate and give a unique one to each of the users. So like:
https://mydomain.workflows.okta.com/api/flo/ba1f1d18d5454545455bbe9f8e3d/invoke?value=abc123
To one user and
https://mydomain.workflows.okta.com/api/flo/ba1f1d18d5454545455bbe9f8e3d/invoke?value=zyx654
To the other user.
Then in the flow you just feed the extracted values from the payload to a lookup table. If it matches one of the allowed values it then proceeds to do the session reset for that user. If it doesn't match it does nothing. Since they are both unique (unguessable) values then User 1 won't know how to reset User 2.