SharePoint ECB Menu Refresh In Federated Authenticated Site

In this article, we look at how to solve the ECB menu refresh in the federated authenticated site.
 
Note 1
 
This issue is only for federated authentication and not for Windows Authentication mode.
 
Note 2
 
In our scenario, LogonTokenCacheExpirationWindow is 9 minutes and ServiceTokenCacheExpirationWindow is 10 minutes. So, the popup holds good for 1 minute.
 
In federated authenticated site, ECB menu of an item (List or Library) refresh depends on the lifetime difference between LogonTokenCacheExpirationWindow and ServiceTokenCacheExpirationWindow. By default, it is 10 minutes for both and hence when the ECB menu is clicked the second time after the page loaded, the popup won’t appear. The issue here is the popup must make an AJAX call which expires because the cache is already expired.
  • Select an item under any app in SharePoint and click on the second level ECB Menu (For example click “…” of any document and then again click “…”, as shown below – marked in green color). 

  • For the first time, it opens fine and if you leave the page and don’t do any user action for more than 1 minute (in our case) this depends on LogonTokenCacheExpirationWindow Expiration and SecurityTokenCacheExpirationWindow.
  • In our case, LogonTokenCacheExpirationWindow is 9 minutes and SecurityTokenCacheExpirationWindow is 10 minutes. Hence, the popup holds good for 1 minute and after that, it needs to reauthenticate and hence it is not reloading.
  • The 2nd level ECB menu makes AJAX call and hence page is not refreshing for the federated authenticated sites.
  • If the 2nd level ECB (…) is clicked after 1-minute popup doesn’t reload. (In F12 mode, you could see the error as mentioned below).
Solution
 
Update the LogonTokenCacheExpirationWindow to 1 minute using the below command.
  1. $logontime = Get-SPSecurityTokenServiceConfig  
  2. $logontime.LogonTokenCacheExpirationWindow = (New-TimeSpan -Minutes 1)  
  3. $logontime.Update()  
Now, the cache expiration difference between ServiceTokenCacheExpirationWindow and LogonTokenCacheExpirationWindow become 9 (10-1 = 9 minutes).
 
This makes sure the second level ECB menu loads properly as shown below, 
 

Comments


  1. Travel to India in air-conditioned comfort to visit one of the world's most iconic monuments. The Taj Mahal is probably the best known monument to love that was ever built.

    GOLDEN TRIANGLE TOUR 3 DAYS 2 NIGHTS
    GOLDEN TRIANGLE TOUR 4 DAYS 3 NIGHTS
    GOLDEN TRIANGLE TOUR 5 DAYS 4 NIGHTS
    GOLDEN TRIANGLE TOUR WITH AJMER PUSHKAR
    GOLDEN TRIANGLE WITH RANTHAMBORE JAIPUR DELHI
    TAJMAHAL SUNRISE TOUR
    TAJ MAHAL SAME DAY TOUR

    For more information

    Thank & Regard
    Vicky
    Visit our website https://www.goldentajtours.com/
    Email : goldentajtours2@gmail.com
    phone : +919997349090, +919897070013,+918395877144

    ReplyDelete

Post a Comment

Popular posts from this blog

Run Powershell script on Remote Computer/Server

Power BI Refresh Issue: unable to convert the value '' from the source data type 'VT_BSTR' to the expected data type 'VT_I8.

SPDActivities - DP.SharePoint.Workflow - Workflow failed to run