Idle Session timeout for SharePoint 2013 Appiications

Muthuraman Ramasamy 1 Reputation point
2021-01-05T07:29:19.487+00:00

Hi All,

Today we received a new requirement from our client to enable Session time-out in SharePoint 2013.

Once idle time outreached, the application should show a popup message to the user and redirect to the home page of the site.

Our Production Environment is a one-way forest trust with Single sign-on enabled. Web applications are using claims authentication.

We tried some of the option to set time-out like

  1. Enable security validation timeout setting in Central Administration.
  2. Change the session timeouts in SharePoint sites using PowerShell Script below.
    $tokenservice = Get-SPSecurityTokenServiceConfig 
    $tokenservice.UseSessionCookies = $true 
    $tokenservice.LogonTokenCacheExpirationWindow = New-TimeSpan -Minutes 5 
    $tokenservice.Update()
    
    1. force timeouts in a SharePoint intranet site using the Master page
      Ref link: https://slightlybehindthecurve.wordpress.com/2008/02/29/how-to-force-timeouts-in-a-sharepoint-intranet-site-when-using-windows-authentication/
    2. Session timeout in Web.config file
      We are unable to achieve expected idle session timeout functionality Using the above methods

I am looking for your expertise to support this.

Microsoft 365 and Office SharePoint Server For business
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Chelsea Wu 6,341 Reputation points Moderator
    2021-01-06T02:40:01.813+00:00

    Hi @Muthuraman Ramasamy , thank you for posting in the Q&A forum.

    After enabling and setting Idle Session timeout via Central Administration / using PowerShell / in Web.config file, you can write your custom function in a custom master page in the SharePoint root site collection. A sample can be found here: Sharepoint timeout.
    Once you finish building the custom mater page in root site collection, you can apply it to all site collections in this web application using PowerShell, referring to this post.

    Another reference of JQuery Show Session Timeout message before session expires in asp.net.

    *Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link. *


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    **Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. **


  2. trevorseward 11,711 Reputation points
    2021-01-11T18:30:20.837+00:00

    If using Windows claims, then you cannot have an "idle" timeout as sessions are not persistent to begin with.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.