Skip to content

Ulysses Neves

Microsoft Entra ID, authentication, and hybrid identity troubleshooting.

Menu
  • Início
  • Microsoft Azure
  • Microsoft AD FS
  • Microsoft 365
  • Contact
Menu

AD FS – Troubleshooting TLS version errors when configuring WAP trust with AD FS

Posted on 6 de March de 2021

Hi all. Today I will share with you some steps to help you troubleshoot TLS version mismatch that break the trust between Web Application Proxy and AD FS servers.

Note: In this demonstration, I will use AD FS version 2019. It’s possible to have a different event ID if you are running another AD FS version. In case of doubt, use this link to match the correct event ID to your AD FS version: https://adfshelp.microsoft.com/AdfsEventViewer/GetAdfsEventList

If your WAP and AD FS servers cannot establish a TLS communication properly, the trust will break and you might start having problems to authenticate users from the internet. Some errors you might face when trying to reestablish the trust are mentioned below:

Error: The federation server proxy configuration could not be updated with the latest configuration on the federation service.
Event Logs:

AD FS/Admin
Log Name: AD FS/Admin
Source: AD FS
Event ID: 1130
Task Category: None
Level: Error
Keywords: AD FS
Description: There was an error establishing or renewing the proxy trust. Ensure the STS and proxy servers have the same TLS version enabled.

Log Name: AD FS/Admin
Source: AD FS
Event ID: 224
Task Category: None
Level: Error
Keywords: AD FS
Description:
The federation server proxy configuration could not be updated with the latest configuration on the federation service.
Additional Data
Error: Retrieval of proxy configuration data from the Federation Server using trust certificate with thumbprint ‘THUMBPRINT’ failed with status code ‘InternalServerError’.

AD FS Tracing/Debug
Log Name: AD FS Tracing/Debug
Source: AD FS Tracing
Event ID: 996
Task Category: None
Level: Error
Keywords: ADFSDiagnostics
Description:
Data in the original trace event ‘STSErrorTraceEvent’ is logged individually in this event to prevent potential loss of data.
Original Event : STSErrorTraceEvent
Mode details: Data Error: Exception: An error occurred when attempting to establish a trust relationship with the federation service. Error: The underlying connection was closed: An unexpected error occurred on a send. StackTrace: at Microsoft.IdentityServer.Management.Proxy.Providers.ProxyTrustProvider.EstablishTrustWithSts(ICredentials credentials, String thumbprint) at Microsoft.IdentityServer.Deployment.Core.Tasks.ConfigurationTaskBase.Execute(IDeploymentContext context, IProgressReporter progressReporter) Exception: The underlying connection was closed: An unexpected error occurred on a send. StackTrace: at System.Net.HttpWebRequest.GetResponse() at Microsoft.IdentityServer.Management.Proxy.Providers.ProxyTrustProvider.EstablishTrustWithSts(ICredentials credentials, String thumbprint) Exception: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

Why TLS handshake?

The Transport Layer Security (TLS) Handshake Protocol is responsible for the authentication and key exchange necessary to establish or resume secure sessions and is used by the Web Application Proxy service to establish secure communication to the federation server before establishing the trust. More information about the TLS handshake, please check this link: https://docs.microsoft.com/en-us/windows/win32/secauthn/tls-handshake-protocol

Investigating TLS version

In order to investigate if the communication between WAP and AD FS servers over TLS is working correctly, follow steps below:

Step 1

  • Install network monitor in the WAP server to collect a network trace while configuring the trust.
  • Use filter TLS to see the TLS handshake between client (WAP) and server (AD FS).
  • Expand TLS parameter and check which TLS version is used by the WAP server to communicate with AD FS server.

Step 2

Run the commands below on AD FS servers to see if the respective TLS version above is enabled.

Example: As TLS 1.0 is used by WAP server in this demonstration, run commands below to check if TLS 1.0 is Enabled in the AD FS server.

Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client' | Select Enabled,DisabledByDefault

Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server' | Select Enabled,DisabledByDefault

Expected Output:

Cause:
Many customers are considering the option to disable TLS 1.0 and RC4 protocol on AD FS, and replace it with TLS 1.1 or a later version.
You might have more information about this in this document: https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/disable-and-replace-tls-1dot0#summary

Fix:
If TLS 1.0 is disabled in AD FS, guarantee that all WAP and AD FS servers use the latest TLS version following steps below:

Step 1:
Enable TLS 1.2 on WAP servers running commands below:

New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -Force | Out-Null
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -name 'Enabled' -value '1' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -name 'DisabledByDefault' -value 0 -PropertyType 'DWord' -Force | Out-Null
New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -Force | Out-Null
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -name 'Enabled' -value '1' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -name 'DisabledByDefault' -value 0 -PropertyType 'DWord' -Force | Out-Null

Enabling Strong Authentication for .NET applications

The .NET Framework 3.5/4.0/4.5.x applications can switch the default protocol to TLS 1.2 by enabling the SchUseStrongCrypto registry key. This registry key will force .NET applications to use TLS 1.2.

Starting with AD FS on Windows Server versions 2012 R2 and 2016, you need to use the .NET Framework 4.0/4.5.x key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319

For the .NET Framework 4.0/4.5.x use the following command:

New-ItemProperty -path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -name 'SchUseStrongCrypto' -value '1' -PropertyType 'DWord' -Force | Out-Null

Restart all servers that had the TLS registry keys updated to take effect.

Run command Install-WebApplicationProxy again to re-establish the trust between WAP and AD FS:

Check event 245 on AD FS Admin logs on WAP server:

Log Name: AD FS/Admin
Source: AD FS
Event ID: 245
Task Category: None
Level: Information
Keywords: AD FS
Description:
The federation server proxy successfully retrieved and updated its configuration from the Federation Service ‘sts.contoso.com’.

Confirming client TLS version with network trace

With TLS 1.2 configured as the preferred method on WAP servers, we see TLS handshake completed successfully and confirm that WAP is now using TLS 1.2 on Network trace.

Summary

In this article, we covered some steps to troubleshoot errors related to TLS version mismatch when establishing trust between WAP and AD FS.

I hope you have enjoyed reading this article and it helps you when administering your AD FS environment.

Enjoyed the article? Like and share. 🙂

In case you have any suggestion or feedback, please leave a comment.

[ ]’s

Ulysses Neves

2 thoughts on “AD FS – Troubleshooting TLS version errors when configuring WAP trust with AD FS”

  1. Justin Grundman says:
    14 de June de 2021 at 17:06

    Are we making the tls 1.2 and .net registry changes on the ADFS and WAP or just WAP?

    Reply
    1. Uneves says:
      15 de June de 2021 at 06:00

      hello Justin. Thank you for the question. Depending on the AD FS version you have, the TLS 1.2 is used by default on the AD FS backend servers. To guarantee that both WAP and AD FS servers use the latest TLS version, create the SchUseStrongCrypto registry key on all servers in the farm and reboot them.

      Reply

Leave a Reply Cancel reply

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

Recent Posts

  • Microsoft Authenticator Will Block Jailbroken Devices in 2026 — What You Need to Know 17 de March de 2026
  • Enhancing Azure role activation security with FIDO2/Passkeys 23 de September de 2024
  • Microsoft Entra ID CAP | Enforcing WHfB using Authentication Strength 21 de April de 2024
  • Troubleshooting Error Code ‘0x000005e’ in WHfB: PIN Authentication Woes 11 de February de 2024
  • WHfB: Fixing Windows Hello for Business error ‘LogoncertTemplateReady: NO (StateNoTemplate)’ 29 de December de 2023

Archives

  • March 2026
  • September 2024
  • April 2024
  • February 2024
  • December 2023
  • September 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019

Tags

#aaddownleveldevice #aadhybridjoin #adfs #adfsonsql #azuread #azureauth #azureCA #azuredevice #azurehybridjoin #azuremfa #azuresecurity #capolicy #cloudkerberostrust #conditionalaccess #conditionalaccesspolicy #deviceregistration #gmsaaccount #gopasswordless #hybridaadjoin #mfaserver #msadfs #msazure #msidentity #namedlocation #sslcertificatevalidation #tshootadfs #tshoothybridjoin #tshootwaptrust #waptrust #WHFBcerttrust #whfbdeployment #WHfBhybridsetup #widdatabase adconnect authenticationcontext authenticationstrength az500 azuread azuremfa azurepim azuresecurity cloudsecurity microsoft365 msazure WHfB
©2026 Ulysses Neves | Design: Newspaperly WordPress Theme
Ulysses Neves
Gerenciar Consentimento de Cookies
Para fornecer as melhores experiências, usamos tecnologias como cookies para armazenar e/ou acessar informações do dispositivo. O consentimento para essas tecnologias nos permitirá processar dados como comportamento de navegação ou IDs exclusivos neste site. Não consentir ou retirar o consentimento pode afetar negativamente certos recursos e funções.
Funcional Always active
O armazenamento ou acesso técnico é estritamente necessário para a finalidade legítima de permitir a utilização de um serviço específico explicitamente solicitado pelo assinante ou utilizador, ou com a finalidade exclusiva de efetuar a transmissão de uma comunicação através de uma rede de comunicações eletrónicas.
Preferências
O armazenamento ou acesso técnico é necessário para o propósito legítimo de armazenar preferências que não são solicitadas pelo assinante ou usuário.
Estatísticas
O armazenamento ou acesso técnico que é usado exclusivamente para fins estatísticos. O armazenamento técnico ou acesso que é usado exclusivamente para fins estatísticos anônimos. Sem uma intimação, conformidade voluntária por parte de seu provedor de serviços de Internet ou registros adicionais de terceiros, as informações armazenadas ou recuperadas apenas para esse fim geralmente não podem ser usadas para identificá-lo.
Marketing
O armazenamento ou acesso técnico é necessário para criar perfis de usuário para enviar publicidade ou para rastrear o usuário em um site ou em vários sites para fins de marketing semelhantes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Ver preferências
  • {title}
  • {title}
  • {title}