We are working on Sitecore 10.2 Instance, where we want the Content Author to be logged out after 5 minutes of inactivity.

For that, we have made the changes in the below files, but it didn’t work:

Web.Config :

web config for session state


expire timespan config

I also followed the below thread but it didn't work for me on Sitecore 10.2.

How do I set session timeouts in Sitecore?

  • @Gatogordo I got the solution of this. Can you reopen it? Feb 22 at 13:06
  • No I'm no admin. Richard closed it (as a duplicate actually) so you should talk to him if you think it should be reopened - and the solution is not in the duplicate.
    – Gatogordo
    Feb 22 at 15:40
  • I have updated the question. Please reopen it. Mar 1 at 7:26

3 Answers 3


I found the solution to this by updating two values in the following file in the identity server.


So you need to update the Identity Token to update the logout time. Here are steps.

You need to udpate the IdentityTokenLifetimeInSeconds, so in my case I updated it to 60 seconds like below. 


I also find out one more property by the help of comments given in this config i.e. CookieLifetime. So I updated it like below. 

<!-- Sets the identity server cookie lifetime -->

Finally you need to restart the Sitecore Identity Server so that the updated configuration is consumed on startup.

And it worked. User was able to logout after a minute.

I referred to this article to identify.


And then I wrote this article with all the details.


Hope this helps.

  • Thanks Sumit I was able to solve this by referring to your blog earlier. And Thanks for sharing the answer here as well. Mar 3 at 5:28

You can check by opening your Sitecore instance URL like local.Sitecore.Com/sitecore/admin/showconfig.aspx, may be there is some patch config that is overriding your settings.

For reference you can use below link How do I set session timeouts in Sitecore?

Hope this helps you.


We are working on the Sitecore 10 version. Recently, we got a requirement where we need to update the logout time for Sitecore Admin users, so if they are not using it for more than 2 minutes then they should be logged out from the system.

Initially, we were updating some configuration changes in some configs in our Sitecore site directory but it was not solving the issue.

After investigating it more, we found that we need to update some settings in the configuration settings in the Sitecore Identity server site. And here is the solution that we found to do that. Follow these steps to do it.

  1. Go to your Identity server website root and open the file called identityServer.xml from the below location.


  1. Update the setting called IdentityTokenLifetimeInSeconds in seconds. For example, if I want to log out a user after 2 minutes, the setting will be like this.


  1. There is another setting we found in this file i.e. CookieLifetime and added the time for 2 minutes. This setting sets the identity server cookie lifetime and should be used like this.


Finally, you need to restart the Sitecore Identity Server by going into IIS so that the updated configuration is consumed on startup.

That’s All. Now if you login into Sitecore and it is ideal for 2 minutes then it will perform the logout session after 2 minutes.

Hope it helps!

Credit: https://sbhatiablogs.wordpress.com/2023/02/23/how-to-change-sitecore-identity-server-logout-time/

Your Answer

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

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