An exception occurred when trying to issue security token in SharePoint

In this post, we will try to solve this problem “An exception occurred when trying to issue security token” that you may face after installing a new security update through the automatic windows update on SharePoint Farm.

You might also like to read Security Token Service cannot be activated due to This collection already contains an address with scheme http


An exception occurred when trying to issue security token

When I tried to open SharePoint portal with Claims Authentication that was worked properly! but Suddenly, I got the below error:

An exception occurred when trying to issue security token: The requested service, ‘http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/ actas’; could not be activated. See the server’s diagnostic trace logs for more information.

I have checked the log file and Event Viewer and seems that the Secure Token Service is failing, and I also have asked my team What’s the last action they did ? the answer was only Server Restart.

After a long trip that took more than one day, we have tried to

  • Run SharePoint configuration wizard,
  • Provision Secure Token service,
  • Check farm account password,
  • Restart the server,
  • Searching over the internet and everything you can imagine! with no avail 🙁

Finally, we discovered that during server restart operation, the automatic update downloads have been run and install this Security Update for Microsoft Windows (KB2756920) that effect on Secure Token Service.

Check Installed SharePoint Security Updates

Therefore, we have removed this update by doing the following:

  1. Start Menu > Control Panel > Uninstall A Program
  2. Select View Installed Updates from the top left-hand corner.
  3. Find Security Update for Microsoft Windows (KB2756920) in the list and uninstall it.
An exception occurred when trying to issue security token: The requested service,

Windows Updates in SharePoint Farm Considerations

  • It’s recommended to disable automatic updates on the Production farm. and coordinate with the infra team on your company to download and install the Windows updates after reviewing the fixes list and making sure that these patches will not affect on your SharePoint farm.
  • The SharePoint Security fixes are included in MU/WU updates, these security updates will not be reflected on your farm until you run the SharePoint Configuration Wizard.

Read more at SharePoint Patching Best Practices


Conclusion

In conclusion, we have fixed “An exception occurred when trying to issue security token” issue by removing the latest security update that has been installed during the server restart. Also we have learned what we should do toward the automatic Windows updates in SharePoint farm.

Applies To
  • SharePoint 2013.
  • SharePoint 2010.

1 thought on “An exception occurred when trying to issue security token in SharePoint”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top