Question
When attempting to deploy a solution to a target environment the following error is displayed:
ID4148: The Saml2SecurityToken is rejected because the SAML2:Assertion's NotOnOrAfter condition is not satisfied.
NotOnOrAfter: '10/28/2015 2:21:35 AM'
Current time: '10/30/2015 4:46:06 PM'
What causes this issue and how can it be fixed?
Answer
The reason for this error is most likely due to the trust between SharePoint and Appit becoming lost. This issue can be fixed by retrusting K2 Appit for SharePoint by doing the following:
1. In the site collection where Appit has been applied access Site Contents, find the K2 Appit for SharePoint app from the list of applications.
2. Hover over the K2 Appit for SharePoint icon, you will notice an elipsis, click this elipsis, then the second elipsis that appears, lastly select Permissions:
When the permissions screen opens, you should see a message that says "If there's something wrong with the app's permissions, click here to trust it again". Select the link in this message which will be the word "here". After trust has been refreshed for the site collection you should be able to deploy your solution without issue.