Skip to main content
Solved

How to force a logout for a user?

  • September 12, 2024
  • 3 replies
  • 39 views

DannyPancratz
Forum|alt.badge.img+9

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.

3 replies

olimarrio
Forum|alt.badge.img+5
  • Gainsight Employee ⭐️
  • Answer
  • 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+9
  • Author
  • 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?