Event ID - 640

Event Id640
SourceMicrosoft-Windows-ADFS
DescriptionThe Federation Service encountered an error while loading the trust policy. A collection contains a duplicate item. Collection: %1 Duplicate key: %2 If this error occurs during startup of the Federation Service, the Federation Service will be not be able to start, and all requests to the Federation Service will fail until the configuration is corrected. If this error occurs while the Federation Service is running, the Federation Service will continue to use the last trust policy that was loaded successfully. User Action This error should occur only if the trust policy file has been modified without use of the AD FS administrative tools. Either enable Windows trust on the account partner or remove the AllowedTrustedWindowsDomains field.
Event Information According to Microsoft :

Cause :

This event is logged when the Federation Service encountered an error while loading the trust policy.

Resolution :

Remove the duplicate verification certificates that are listed in the trust policy file

This error occurs only if the trust policy file has been modified without the use of the Active Directory Federation Services snap-in.

Check that there are no duplicate verification certificates listed in the trust policy file, and verify that there are no duplicate items in the collection that is given in the event.

To perform this procedure, you must be a member of the local Administrators group, or you must have been delegated the appropriate authority.

To locate duplicate verification certificates:
  1. In Notepad or another text editor, open the TrustPolicy.xml file that, by default, is in %systemdrive%\windows\systemdata\adfs.
  2. Check the VerificationMethod sections for any duplicate verification certificates.
  3. Remove any duplicate verification certificates that may exist.
Verify :

Verify that you can access the Active Directory Federation Services (AD FS)-enabled application from a client browser and that the resource can be accessed.
Reference LinksEvent ID 640 from Source Microsoft-Windows-ADFS

Catch threats immediately

We work side-by-side with you to rapidly detect cyberthreats
and thwart attacks before they cause damage.

See what we caught

Did this information help you to resolve the problem?

Yes: My problem was resolved.
No: The information was not helpful / Partially helpful.