title: How to configure session timeout for each relying party trust in adfs
body: <p>I have integrated Shibboleth Service provider(SP) with ADFS as Identity Provider(IDP), It is SP initiated integration.</p>
  
  <p>User is able login to the application and able to access the application without any issues.</p>
  
  <p>The issue is when session timeout(say 30 minutes) happens, when user was tried to refresh the application URL in browser, automatically user is re-authenticated at ADFS side.</p>
  
  <p>Note:</p>
  
  <p>1 - At ADFS side, there are n number of relying party trust were configured</p>
  
  <p>2 - I have configured the session timeout at Service Provider side (file name shibbeleth2.xml - timeout="1800"), but no luck.</p>
  
  <pre><code>&lt;Sessions 
              lifetime="28800" 
              timeout="1800"
              checkAddress="true" 
              handlerURL="/Shibboleth.sso" 
              handlerSSL="false" 
              cookieProps="; path=/; secure" 
              exportLocation="http://localhost/Shibboleth.sso/GetAssertion" 
              exportACL="127.0.0.1" 
              idpHistory="false" 
              idpHistoryDays="7"&gt;
  </code></pre>
  
  <p>3 - The default value of ADFS Web SSO lifetime is 480 minutes (8 hours)</p>
  
  <p>4 - I tried by configuring the Web SSO Lifetime to 30 minutes, in this case when user refresh the App URL after 30 minutes, user was asked to re-enter the credentials to login again.</p>
  
  <p>The problem with this approach is - Web SSO Lifetime value is applicable to all Relying Party Trusts.</p>
  
  <p>5 - I have googled for solution, i have found that Tokenlifetime will resolve my issue. but this time also no luck</p>
  
  <pre><code>Set-ADFSRelyingPartyTrust –TargetName "&lt;RelyingPartyTrust&gt;" –TokenLifetime 2(in minutes)
  </code></pre>
  
  <p>Could you please let me know how to configure session timeout for each relying party trust? So that when session time out happens, the user should be asked to enter credentials for login.</p>
  
  <p>Thanks in Advance</p>