Skip to main content
Solved

How to force a logout for a user?

  • 12 September 2024
  • 3 replies
  • 30 views

DannyPancratz
Forum|alt.badge.img+7

I know this API operation exists and as much as I love using the API, sometimes it’s a hassle to use it for the things I don’t have automated. 

So is there a way to force a logout for a user in Control? 

I’ve been doing something I think would work, but I don’t know for sure. 

  1. Update user’s primary role to Unregistered/Not Logged In + save to apply
  2. Update a users’ primary role back to Registered (or whatever it was before) + save to apply

Does that actually work? 

Best answer by olimarrio

Hey @DannyPancratz 👋,

I’ve given this a test and you can do this by banning a user and then unbanning them immediately after. 

Counterintuitively, a user remains logged in if you switch primary role to Unregistered/Not Logged In, Save, and then back to what it was before.

View original

olimarrio
Forum|alt.badge.img+4
  • Gainsight Employee ⭐️
  • September 13, 2024

Hey @DannyPancratz 👋,

I’ve given this a test and you can do this by banning a user and then unbanning them immediately after. 

Counterintuitively, a user remains logged in if you switch primary role to Unregistered/Not Logged In, Save, and then back to what it was before.


DannyPancratz
Forum|alt.badge.img+7
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • September 13, 2024

Thanks @olimarrio!


revote
Forum|alt.badge.img+2
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • September 13, 2024

Can I ask how to know who are logged in users at the moment?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings