I have an application in which before every release we lock all users. Once locked, user cannot login. But if the user is already logged in and then I lock the user, the user will be able to continue until sessions ends.
I'm trying to have a feature so that when I lock all users, all current active sessions of that app should be logged out or ended.
I have tried looping for all active sessions and executing apex_authentication.logout
and passing session ID and app ID for each of them. Somehow if doesn't end session of anybody except the user performing the process.