Sunday, December 21, 2014

How to change the session timeouts in SharePoint sites

How to change the session timeouts in SharePoint sites

SharePoint  allows you to set timeout of the user session so that your users are logged out after certain time of inactivity. Also, SharePoint allows you to configure the timeout for the current page state to expire. This is handy for forms which have to be filled within certain period of time before they expire.
Alternatively, if you want to extend the timeout – you can do that.

let’s take a look at how you can expire page content after a given time using Power Shell:

Open SharePoint Management Shell as administrator and execute the following:
$SPSite = Get-SPSite("[your site collection]")
$webApp = $SPSite.WebApplication
$webApp.Enabled = $true
$webApp.Expires = $true
$webApp.Timeout = New-TimeSpan -Hours 2 -Minutes 30
$webApp.Update()

This will effectively enable expiration and set page content to expire after users leave it hanging for over 2 hours and 30 minutes.

if you’re using claims authentication and would like for your provider to expire sessions after certain period of inactivity, here is how to do that with Power Shell:

$sts = Get-SPSecurityTokenServiceConfig
$sts.UseSessionCookies = $true
$sts.LogonTokenCacheExpirationWindow = New-TimeSpan -Minutes 5
$sts.Update()

This will set our logon expiration to 5 minutes.


I hope the above information will help you to resolve the issue, in case of any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

No comments:

Post a Comment

Your feedback is Much Appreciated. I will try to reply to your queries as soon as possible!!Anil Avula

ShareThis

X