Skip to main content
17-Peridot
December 15, 2022
Solved

Terminate/End SSO user session on Logout

  • December 15, 2022
  • 2 replies
  • 2823 views

Hi Experts,

 

Please suggest a way to terminate user session from browser once the Logout is triggered.

The user is being authenticated through SSO and want the user to click a button(probably logout) and should be redirected to login again to enter the Azure AD credentials instead of re-login automatically because the session is still alive.

 

I have already tried TerminateUserSession resource but that works only for Administrators group members and I have non-administrator custom user groups with specific permissions.

 

Note: Don't want to redirect to a different mashup/screen as a workaround.

 

TIA.

Best answer by nmutter

You somehow need to trigger the logout in your IdP as well. There is an older PTC article stating you need to call the "Singe logout url" of your Idp: How to logout from ThingWorx after signing in with SSO 

I did not yet try to configure SingleLogout. If you find out more I would be happy if you can share details.

2 replies

22-Sapphire I
December 16, 2022

TerminateUserSession would accomplish the same thing as the regular Logout.

Your challenge is the fact that Azure AD is not receiving a termination and is holding the session for xx minutes still.

Strange though, because even when using AD that shouldn't be the case, might be a side effect of how your SSO setup works?

I can understand it, if your logout isn't an actual Thingworx logout or if users just close the browser.

What 'Logout' are you using?

TanmeyTWX17-PeridotAuthor
17-Peridot
December 18, 2022

Pai,

 

I have configured SSO as mentioned in this PTC guide. SSO with Thingworx.

 

I have used Logout Function ,part of Mashup functions not widget.

nmutter16-PearlAnswer
16-Pearl
December 18, 2022

You somehow need to trigger the logout in your IdP as well. There is an older PTC article stating you need to call the "Singe logout url" of your Idp: How to logout from ThingWorx after signing in with SSO 

I did not yet try to configure SingleLogout. If you find out more I would be happy if you can share details.

TanmeyTWX17-PeridotAuthor
17-Peridot
December 22, 2022

Hi, Tried Single logout url also but it doesn't end the session in a way. Reloading or hitting browser back button is getting the user logged-in again

TanmeyTWX17-PeridotAuthor
17-Peridot
December 26, 2022

Hi,

I have tried with .srf single logout url and seems to be working. Thanks!