I've setup a custom trusted identity provider. It logs the user into SharePoint just fine - however, the problem is that user stays logged in even after a browser restart.

The trusted identity provider website itself logs out, but SharePoint doesn't ask the identity provider to confirm login.

After some investigation it appears that for some reason SharePoint is setting the FedAuth cookie as a persistent cookie instead of a session cookie (whereas the identity provider set itself uses a session cookie).

How can I tell SharePoint to make the FedAuth cookie be a session cookie instead of a persistent cookie?

1 Answer 1


With PowerShell:

$sts = Get-SPSecurityTokenServiceConfig
$sts.UseSessionCookies = $true


  • It looks like this is global to the entire SharePoint installation - is that correct? (and if so can it be restricted to either a particular trusted identity provider, or to a particular web application?)
    – Nathan
    Oct 28, 2014 at 9:19
  • Yes, Get-SPSecurityTokenServiceConfig returns security token service (STS) for the farm. I do not know any way to use sessions cookie for sinf=gle webb application. Oct 28, 2014 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.