Symptoms:
The environment contains two ADFS servers implemented in the internal network and two ADFS Proxy servers implemented in the DMZ network.
When testing ADFS functionality from the internal network where sts.domain.com points to the NLB of the ADFS servers in the internal network the user can access Office 365.
When testing ADFS from the Internet or from the DMZ the ADFS Proxy returned the following error:
--------------------------------------------------------------------------
Error:
There was a problem accessing the site. Try to browse to the site again.
If the problem persists, contact the administrator of this site and provide the reference number to identify the problem.
Reference number: 25b51e4b-a68d-47d6-8fc7-ee5a56337ed4
The following snapshot shows the error:
When checking the event viewer on the ADFS Proxy servers the error Event ID 346 were logged several times:
Event id 364
Encountered error during federation passive request.
Additional Data
Exception details:
System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: An error occurred when verifying security for the message.
-----------------------------------------------------------------------
The following snapshot shows the error in the event viewer:
Reason:
ADFS Proxy configuration was fine as well as the certificate. However after troubleshooting the error the cause of it was due to time change.
The internal ADFS servers synchronizing the time with the Domain Controllers (DCs), and there were 20 minutes time difference between the ADFS proxy servers and the ADFS servers.
Solution:
Reset the time on the ADFS proxy servers to match the time on the ADFS servers.
1. We have the cmdlet that caused the error New-SendConnector.
2. We have the same attribute (msExchSmtpTLSCertificate):len 552
3. And we have the famous error of the cmdlet has thrown an exception.
- Issuer: this field shows the name of the Certificate Authority (CA) who issued the certificate, and as you can see Comodo has a very long name compared with other CAs.
- Subject: this field shows information like Organization (O), Country (C), Common Name (CN). And again as you can see from the marked field in the snapshot the customer was using a very long name.
1. Use user account that member of Schema Admins and Enterprise Admins.
2. Open adsiedit.msc
3. Right click ADSI Edit and click on Connect To.
4. Select “Well known Naming Context” and from the drop down menu select “Schema” as the following snapshot:
5. Browse to CN=ms-Exch-Smtp-Tls-Certificate, open the properties and scroll down to rangeUpper as the following snapshot
6. Click Edit and enter the new value 1024, as the following snapshot:
7. Enforce the replication by running repadmin /syncall from the command prompt.
8. Verify that the rangeupper limit has been increased by running the following command:
dsquery * CN=ms-Exch-Smtp-TLS-Certificate,CN=Schema,CN=Configuration,DC=DOMAIN_NAME,DC=com -scope base -attr rangeUpper