Many Always On VPN administrators configure the user tunnel to use Internet Key Exchange version 2 (IKEv2) first, then fall back to Secure Socket Tunneling Protocol (SSTP) when IKEv2 is unavailable. It sounds like a smart compromise, but in practice, it doesn’t work. After years of deploying Always On VPN for organizations of all sizes, my guidance is simple. Pick a protocol and stick with it. For the user tunnel, that protocol should be SSTP.
The Appeal of Protocol Fallback
The reasoning behind protocol fallback is easy to understand. IKEv2 is widely viewed as the more secure option and often appears on compliance checklists. However, it uses UDP ports 500 and 4500, which are commonly blocked on hotel, airport, and guest networks, and it is prone to connection failures caused by IP fragmentation. SSTP, by contrast, uses TCP port 443 and works nearly anywhere HTTPS does. Falling back from IKEv2 to SSTP appears to deliver the security of one with the reliability of the other. Historically, administrators enabled this behavior by editing the VpnStrategy setting in the rasphone.pbk file, as I described in Always On VPN IKEv2 and SSTP Fallback. More recently, Windows 11 introduced the ProtocolList native protocol type in the VPNv2 Configuration Service Provider (CSP), along with the RetryTimeInHours setting, to configure protocol preference natively.
Why Protocol Fallback Fails
Unfortunately, protocol fallback falls short in several important ways, including the following.
Unreliable Operation
In my experience, protocol fallback doesn’t work reliably, if at all. Clients often continue retrying IKEv2 and never attempt SSTP, leaving users without connectivity on the very networks fallback was supposed to address. In other cases, fallback works once, and the client then behaves unpredictably on subsequent connection attempts. A remote access solution that works only some of the time is not one users or help desk staff can depend on.
No Failover During a Session
Protocol selection happens only when the VPN connection is established. If an IKEv2 connection succeeds and later fails during the session, for example, because a stateful firewall drops the UDP session or a network path begins discarding IP fragments, Windows does not switch to SSTP. The user is simply disconnected. Fallback provides no resilience whatsoever once the tunnel is up.
A Broken Implementation
Microsoft’s implementation introduces problems of its own. With the legacy VpnStrategy configuration, Windows overwrites the setting after a fallback occurs, so a client configured to prefer IKEv2 will prefer SSTP on subsequent connections. A registry setting is supposed to prevent this, but it doesn’t always work as expected. The Windows 11 ProtocolList option in the VPNv2 CSP isn’t much better. As I documented in Always On VPN and VpnStrategy, when ProtocolList is defined, Windows always reports IKEv2 as the active protocol, even when the connection is established using SSTP. In addition, the VPN profile can no longer be managed with PowerShell because it doesn’t appear in the output of Get-VpnConnection.
Troubleshooting Complexity
Supporting two protocols also doubles the operational burden. Administrators must maintain certificates, cryptography settings, firewall rules, and load balancer configuration for both IKEv2 and SSTP. When users report connectivity problems, determining which protocol was attempted, which one failed, and why is far more difficult, especially when the client misreports the active protocol.
Pick a Protocol and Stick With It
My recommendation is to select a single VPN protocol for the user tunnel and configure it exclusively. A single protocol delivers predictable behavior, simpler infrastructure, and far easier troubleshooting. Windows 11 also supports SSTP as a native protocol type in the VPNv2 CSP, so administrators can configure an SSTP-only user tunnel directly, without relying on the Automatic protocol type or editing rasphone.pbk on every endpoint.
Always On VPN ProfileXML configured to use SSTP exclusively.
Platform Limitations
SSTP isn’t an option for every organization. It is a Microsoft-proprietary protocol supported by Windows Server Routing and Remote Access Service (RRAS), so organizations using non-Microsoft VPN platforms, such as Cisco, Check Point, Palo Alto Networks, and others, must use IKEv2 with the native Windows VPN client. In addition, Microsoft is retiring SSTP on Azure VPN Gateway. As of August 31, 2026, SSTP can no longer be enabled on Azure VPN gateways, and existing SSTP connections stop working on March 31, 2027. Organizations using Azure VPN Gateway for Always On VPN must migrate to IKEv2 or move to another VPN platform, as outlined in SSTP protocol retirement and connections migration.
SSTP Is the Right Choice for the User Tunnel
For most organizations, that single protocol should be SSTP, for the following reasons.
Firewall Friendly and Reliable
SSTP uses TCP port 443, the same port used for HTTPS, which is open on virtually every network. It isn’t affected by the IP fragmentation issues that plague IKEv2, and it can be load balanced using the same techniques used for any HTTPS web service. The result is consistent, dependable connectivity for users wherever they happen to be working.
IKEv2 Isn’t More Secure by Default
Technically speaking, IKEv2 can be configured with stronger security than SSTP. However, it isn’t by default. Out of the box, a Windows client connecting to a Windows Server RRAS server negotiates IKEv2 using 3DES encryption, SHA-1 integrity, and Diffie-Hellman (DH) group 2 (1024-bit) key exchange, all of which fall well short of today’s standards. Achieving strong IKEv2 security requires custom cryptography settings on both the client and the server, and those settings must match exactly, or connections fail. Organizations that choose IKEv2 for security but skip this configuration end up with a connection that is considerably weaker than they assume.
SSTP with TLS 1.3 Is Secure by Default
SSTP uses Transport Layer Security (TLS) to protect the tunnel. Beginning with Windows Server 2022 and Windows 11, SSTP supports TLS 1.3, which dramatically improves security with no additional configuration required. TLS 1.3 removes legacy and insecure cryptography entirely, and every TLS 1.3 cipher suite provides authenticated encryption and forward secrecy. Combined with certificate-based user authentication using Protected Extensible Authentication Protocol (PEAP), SSTP delivers strong protection that exceeds the security requirements of most organizations.
SSL Labs Server Test results for an Always On VPN SSTP server with TLS 1.3 enabled.
The test results also indicate that the server doesn’t support post-quantum cryptography (PQC) key exchange. That’s expected, as Windows RRAS and SSTP don’t support PQC yet. To learn more about PQC and how to prepare your organization for it, visit my Post-Quantum Cryptography (PQC) resources page.
Note: TLS 1.3 for SSTP requires Windows Server 2022 or later on the VPN server and Windows 11 on the client. For earlier versions, follow the guidance in Always On VPN SSTP Security Configuration to disable legacy protocols and optimize TLS cipher suites.
TLS Is Trusted Everywhere
Some administrators hesitate to use SSTP because it isn’t IPsec. There’s no reason for this concern. TLS is the same protocol that protects authentication to Microsoft Entra ID, online and commercial banking, payment card transactions, email, and nearly every software as a service (SaaS) application organizations depend on today. If TLS is trusted to protect your identity provider and your financial transactions, it is certainly secure enough for the Always On VPN user tunnel.
What About the Device Tunnel?
The device tunnel is the exception. Always On VPN device tunnel connections support only IKEv2 with machine certificate authentication, so there is no protocol choice to make. Administrators deploying a device tunnel must allow UDP ports 500 and 4500 through their firewalls, should consider enabling IKEv2 fragmentation, and must configure custom cryptography settings as described in Always On VPN IKEv2 Security Configuration. However, the device tunnel requirement doesn’t change my recommendation for the user tunnel. Using IKEv2 for the device tunnel and SSTP for the user tunnel is a common and fully supported configuration.
A Better Alternative: A Backup SSTP Connection
For organizations that must use IKEv2 for the user tunnel, perhaps because of a specific compliance mandate, there’s a better option than automatic fallback.
How a Backup SSTP Connection Works
Deploy the primary Always On VPN user tunnel using IKEv2 exclusively, then deploy a second VPN profile that uses SSTP exclusively. The backup profile isn’t configured as an Always On connection and doesn’t use trusted network detection, so it connects only when the user launches it manually. If the IKEv2 connection fails, the user (or the help desk) simply connects using the backup SSTP profile. Give the backup profile a clear, descriptive name so users can identify it easily, and keep its routing, DNS, and authentication settings consistent with the primary profile.
Deploying a Backup Connection with DPC
Always On VPN Dynamic Profile Configurator (DPC) includes native support for deploying a backup VPN connection, making this approach simple to implement. Administrators define the backup connection alongside the primary user tunnel settings using Active Directory group policy or Microsoft Intune, and DPC handles provisioning the profile and keeping it up to date on endpoints. DPC also includes an IKEv2 first, SSTP fallback protocol option, but for the reasons outlined previously, I recommend using the backup connection instead.
Always On VPN DPC Backup User Tunnel Settings in group policy.
Summary
IKEv2 with SSTP fallback looks good on paper, but it is unreliable in practice, offers no protection against failures during an active session, and suffers from implementation issues in Windows that make it difficult to manage and troubleshoot. Instead, pick a single protocol and stick with it. For the user tunnel, SSTP is the clear choice when your VPN platform supports it. It works on virtually any network, and with TLS 1.3 on Windows Server 2022 and Windows 11, it is more secure by default than IKEv2. If IKEv2 is a hard requirement, deploy a backup SSTP connection that users can launch manually when needed, which Always On VPN DPC makes easy.
In previous posts, I described how to configure CertKit to automatically deploy renewed TLS certificates to Microsoft Entra Application Proxy applications using client secret authentication and managed identity authentication. Client secret authentication works anywhere, but the secret is a bearer credential that can be copied, pasted, logged, or leaked. A managed identity eliminates the secret, but it requires the CertKit agent to run on an Azure virtual machine or an Azure Arc-enabled server. CertKit now supports certificate authentication, which offers the best of both. The private key is created on the CertKit agent server, protected by the Trusted Platform Module (TPM), and can’t be exported, and it works on any Windows server without an Azure dependency. Version 2.0 of my New-CertKitAppProxyIdentity.ps1 PowerShell script configures it end to end in a single run, using the same least-privilege permissions as the other methods. The following sections describe how to configure it using both PowerShell and the Entra admin center.
Why Use Certificate Authentication
With certificate authentication, CertKit signs in to Microsoft Graph by signing a client assertion with the certificate’s private key, and Entra validates it against the public key uploaded to the app registration. This approach offers several advantages, including the following.
No shared secret. Only the public key leaves the server. CertKit stores the certificate thumbprint, which is useless without the private key.
Bound to the server. The private key is created in the TPM and marked non-exportable, so it can’t be copied out of the server and used elsewhere.
Works anywhere. No Azure subscription, Azure virtual machine, or Azure Arc agent is required. The CertKit agent can run on any Windows server, on-premises or in any cloud.
The following table compares the three authentication methods CertKit supports for Entra App Proxy.
Client Secret
Managed Identity
Certificate
Where the agent runs
Anywhere
Azure virtual machine or Azure Arc-enabled server
Any Windows server
Credential
Shared secret entered in CertKit
Tokens issued by Azure
Private key stored in the TPM
Can be copied and reused elsewhere
Yes
No
No
Azure dependency
None
Azure subscription, plus Azure Arc outside Azure
None
Rotation
At least every 12 months
Not required
Every 30 to 365 days
A managed identity is a good choice when the CertKit agent already runs on an Azure virtual machine. For servers outside Azure, though, it carries a management burden. The server must be onboarded to Azure Arc, the Azure Arc agent must be kept up to date, the server needs outbound access to Azure endpoints, and an Azure subscription is required in the same tenant. Azure Arc-enabled servers also support only a system-assigned managed identity, which is shared with the Azure Arc agent and other services on the server. The Azure Arc core control plane is free, but add-on management services such as Azure Update Manager, Azure Policy guest configuration, and Microsoft Defender for Cloud are billed per server once enabled, and they’re easy to accumulate once servers are managed in Azure. Certificate authentication avoids all of this. There are tradeoffs, however. The certificate expires and must be rotated, and anyone with administrative access to the server can use the key to sign in as CertKit, even though they can’t export it. Least privilege limits the impact, just as it does with the other methods.
Requirements
Using certificate authentication with CertKit requires the following.
Access to the CertKit agent server. The certificate’s private key is non-exportable, so it must be created on the server running the CertKit agent, in an elevated PowerShell session. There’s no option to import an existing certificate.
A TPM (recommended). A physical TPM or a virtual TPM (vTPM) protects the private key in hardware. Most virtualization platforms provide a vTPM, including Hyper-V Generation 2 virtual machines, Azure virtual machines with Trusted Launch, and VMware vSphere, though it may need to be enabled. If no TPM is available, the key is stored in software instead. More on that below.
The Microsoft Graph PowerShell module on the agent host. The CertKit agent uses the Microsoft.Graph.Authentication module to sign in with the certificate. Since the agent runs as Local System, the module must be installed for all users. The configuration script uses the same module.
An administrative account. An account that can create custom roles, grant application permissions, and assign directory roles, such as Privileged Role Administrator or Global Administrator.
Microsoft Entra ID P1. This is already required for Application Proxy and custom roles. Assigning the role through Privileged Identity Management (PIM) requires Microsoft Entra ID P2 or Microsoft Entra ID Governance.
Required Permissions for CertKit
Certificate authentication uses an Entra app registration with the same least-privilege permissions as the client secret method, including the following.
Application.Read.All. A read-only Microsoft Graph application permission CertKit uses to find App Proxy applications in the tenant.
A custom Entra role. A custom role, named App Proxy Certificate Manager in this example, with only three permissions: read Application Proxy settings, update the Application Proxy SSL certificate, and read connector groups.
With these permissions, CertKit can’t add credentials to applications, change API permissions, or grant consent. For more details on these permissions and why built-in roles such as Application Administrator should be avoided, see the client secret post. If you’ve already created the custom role for another authentication method, you can reuse it.
Configuration Using PowerShell
You can perform the entire configuration in a single run using my New-CertKitAppProxyIdentity.ps1 PowerShell script on GitHub. Beginning with version 2.0, certificate authentication is the default. The script is also available in the PowerShell Gallery. On the CertKit agent server, open an elevated Windows PowerShell window and install the Microsoft.Graph.Authentication module for all users, along with the script, using the following commands. Be sure to use Windows PowerShell, not PowerShell 7, when installing the module. The two use separate module locations, and the CertKit agent uses Windows PowerShell.
Then run the script. Add -UsePim to assign the role through PIM, and -TenantId if your account has access to more than one tenant.
New-CertKitAppProxyIdentity.ps1 -UsePim
What the Script Does
A single run of the script performs the following steps.
Creates a self-signed certificate in the local computer’s personal certificate store, before anything changes in Entra.
Creates or reuses the custom role, the app registration, and its service principal.
Grants Application.Read.All and assigns the role, either directly or through PIM.
Uploads the public certificate to the app registration, named CertKit Agent – <computer name>.
Removes expired certificates and client secrets from the app registration, and expired CertKit certificates from the local store.
With -RemoveExistingCertificates, removes this server’s older certificates from Entra and the local store.
Displays the tenant ID, client ID, and certificate thumbprint to enter in CertKit.
Creating the certificate first means a TPM failure leaves the tenant untouched, with no partially configured app registration or role. If the certificate never reaches Entra, because of an error or a declined confirmation prompt, the script deletes it from the local store so nothing is left behind. When the script finishes, it displays output similar to the following.
KeyStorageProvider : Microsoft Platform Crypto Provider
CustomRole : App Proxy Certificate Manager
RoleAssigned : Through PIM
OldCertificatesRemoved : 0
ExpiredCertificatesRemoved : 0
LocalCertificatesRemoved : 0
ExpiredSecretsRemoved : 0
CertKit needs three values from this output: TenantId, ClientId, and CertificateThumbprint. Skip ahead to Configure CertKit to complete the configuration. To learn more about the certificate and its options, or to configure certificate authentication manually, continue reading.
Certificate Details
The script creates a self-signed certificate with the following settings.
Setting
Value
Subject
CN=CertKit App Proxy Agent, no subject alternative names
Key
RSA 2048, non-exportable
Signature
SHA256
Key usage
Digital Signature
Enhanced key usage
Client Authentication (1.3.6.1.5.5.7.3.2), or a custom OID
Validity
365 days by default; 30, 90, or 180 days with -CertificateValidityDays
Store
Cert:\LocalMachine\My
The key length is fixed at RSA 2048 because many TPMs don’t support larger RSA keys. The maximum lifetime is one year, which keeps rotation a practiced routine. With a TPM-protected key, the risk of key theft is low, so very short lifetimes add little. A 30-day lifetime is practical only if you automate rotation.
TPM Key Storage
The script first asks the Microsoft Platform Crypto Provider to create the private key in the TPM. If that fails, such as on a virtual machine without a vTPM or a server with the TPM disabled, the script displays a warning with the reason and stores the key using the Microsoft Software Key Storage Provider instead. A non-exportable software key resists normal export tools, but not a determined local administrator. If your security policy requires hardware-protected credentials, add -RequireTpm, which turns the fallback into an error before any changes are made to the tenant. The KeyStorageProvider value in the script output reports the provider actually holding the key.
Note: If the TPM is cleared or the server’s motherboard is replaced, the private key is lost. Run the script again to issue a new certificate.
Custom EKU
By default, the certificate includes the Client Authentication enhanced key usage (EKU), which works for all deployments. If your organization has a registered IANA Private Enterprise Number (PEN), you can use -CustomEku to replace Client Authentication with an object identifier (OID) under your PEN. Entra doesn’t check the EKU when CertKit signs in. It only verifies the signature against the uploaded public key. A custom EKU documents the certificate’s purpose and prevents it from being used for general client authentication elsewhere. The script validates the OID format, but it can’t confirm the PEN belongs to you. Windows displays a private EKU as Unknown Key Usage, which is expected. The following example uses 32473, a PEN reserved for documentation. Replace it with your own.
The same configuration can be performed manually. The certificate must still be created with PowerShell on the CertKit agent server, but the rest can be done in the Microsoft Entra admin center.
Create the Certificate
To begin, open an elevated PowerShell window on the CertKit agent server and create the certificate using the following commands. The private key is created in the TPM using the Microsoft Platform Crypto Provider and marked non-exportable. To use a custom EKU, replace 1.3.6.1.5.5.7.3.2 with your PEN-based OID.
Record the thumbprint, which CertKit needs later. If the server doesn’t have a TPM, the command fails. Remove the Provider line to store the key using the software key storage provider instead.
Export the Public Key
Next, export the certificate’s public key to a file. The private key isn’t included, and because it’s non-exportable, it can’t be.
Now create the app registration, grant the Application.Read.All permission, and create and assign the custom role as described in the client secret post. Skip the step to create a client secret. If you’ve already configured an app registration for client secret authentication, you can reuse it.
Upload the Certificate
Finally, upload the public certificate to the app registration.
Navigate to Entra ID > App registrations and select CertKit App Proxy Deployment.
Navigate to Certificates & secrets > Certificates and click Upload certificate.
Select the exported .cer file, enter a description, such as CertKit Agent – <computer name>, and click Add.
Confirm the thumbprint displayed matches the one recorded earlier.
Configure CertKit
With the app registration and certificate in place, create a new deployment in CertKit using the Microsoft Entra Application Proxy (Certificate Auth) template for the agent running on the server where the certificate was created. Select the certificate to deploy, then enter the Entra tenant ID, App registration (client) ID, and App registration certificate thumbprint. The thumbprint is displayed in the script output, or you can find it on the certificate’s Details tab in the Certificates (Local Computer) management console (certlm.msc) under Personal > Certificates. Then list the App Proxy applications to update by name, separated by commas, or enter an asterisk (*) as an app list wildcard to update all of them. If you update all applications, be sure to use a wildcard or multi-SAN (subject alternative name) certificate that covers the external URL of every App Proxy application you want CertKit to manage.
Deploy and Validate
After saving the CertKit deployment, wait a few minutes for the role assignment and API permission to take effect, then run the deployment. A successful run shows CertKit signing in as the app registration using the authentication certificate’s thumbprint, then lists each App Proxy application, whether its external URL is covered by the certificate, and the thumbprint Entra reports after the update.
Update command output:
Microsoft Entra Application Proxy Deployment | Apps: *
Signed in as the app registration <redacted> using certificate <redacted> (tenant <redacted>)
Graph permissions: Application.Read.All
Warning: The identity has no Microsoft Graph permission to update apps. Unless an Entra role allows it, uploads will be refused. Grant the application permission Application.ReadWrite.OwnedBy (admin consented) and add the identity as an owner of each App Proxy app.
[Step 3] Finding App Proxy apps...
Found 7 App Proxy app(s)
App1 (https://app1.example.net/): covered by this certificate
Private Access App: skipped, a Global Secure Access (Private Access) app, which has no TLS certificate
App2 (https://app2.example.net/): covered by this certificate
App3 (https://app3.example.net/): covered by this certificate
App4 (https://app4.example.net/): covered by this certificate
App5 (https://app5.example.net/): covered by this certificate
App6 (https://app6.example.net/): covered by this certificate
DONE | Updated 6 app(s), 0 already had the certificate. Entra takes a minute or two to start serving it.
CertKit displays a warning that the identity has no Graph permission to update apps, but you can safely ignore it, because the custom role grants that access. App Proxy can take several minutes to begin serving the new certificate. To confirm the certificate the endpoint is serving, use my Get-TlsCertificate PowerShell script, as described in the client secret post.
Get-TlsCertificate -Hostname app1.example.net
Certificate Rotation and Multiple Agent Servers
The authentication certificate must be rotated before it expires, or CertKit deployments will fail. Each time the script runs, it creates a new certificate, and you can rotate in one of two ways.
Two-step rotation. Run the script without additional switches, update CertKit with the new thumbprint, confirm a deployment succeeds, then delete the old certificate in the Entra admin center. There’s no downtime.
One-step rotation. Run the script with -RemoveExistingCertificates, which removes this server’s older certificates from Entra and deletes them locally, along with their private keys. CertKit deployments fail until it’s updated with the new thumbprint.
Expired certificates and client secrets are removed from the app registration automatically, and expired CertKit certificates are deleted from the local store, so cleanup happens with each run. Certificates are named after the server that created them in Entra, which lets multiple CertKit agent servers share a single app registration. Running the script on one server rotates only that server’s certificates and never touches another server’s. Certificates are identified by NetBIOS computer name, so be sure each agent server has a unique name. Also, if your tenant has an app management policy that limits credential lifetimes, it may reject a certificate with a longer validity period.
Migrating from Client Secret Authentication
Version 2.0 of the script includes two changes that may affect existing scripts or runbooks. First, certificate authentication is now the default, so running the script with no parameters creates a certificate and requires an elevated session on the CertKit agent server. Add -UseClientSecret to keep using client secrets. Second, client secrets are now limited to 12 months, down from 24, so -SecretExpirationMonths values greater than 12 are rejected. To move an existing deployment from a client secret to a certificate, use the following steps.
On the CertKit agent server, run the script in an elevated session with the same -DisplayName and -RoleName used originally. The existing app registration and role are reused, a certificate is added, and the script warns that client secrets remain.
Update the CertKit deployment to use certificate authentication with the new thumbprint, and confirm a deployment succeeds.
Delete the old client secrets in the Entra admin center under Certificates & secrets > Client secrets.
Removing the Configuration
To remove the configuration, use my Remove-CertKitAppProxyIdentity.ps1 PowerShell script. The script removes the role assignments, deletes the app registration along with its certificates and secrets in Entra, and keeps the custom role if another identity still uses it. Beginning with version 1.3, the -RemoveLocalCertificates switch also deletes the app registration’s certificates and private keys from the CertKit agent server. Run it in an elevated session on the agent server.
The script matches local certificates by thumbprint, so certificates belonging to any other CertKit app registration on the same server are left alone. Local certificates are deleted only after the app registration is deleted, so a declined prompt or a failure never breaks a working configuration. Use -WhatIf to preview the changes. If multiple agent servers share the app registration, the first server’s run deletes it, so the remaining servers can’t match thumbprints afterward. The script’s README on GitHub includes a command to clean them up manually.
Summary
Certificate authentication gives CertKit a credential that can’t leave the server it was created on. It provides stronger protection than a client secret without the Azure subscription, Azure Arc onboarding, and ongoing management a managed identity requires for servers outside Azure. It uses the same custom Entra role and read-only Application.Read.All permission as the other methods, so the configuration follows security best practices and enforces least privilege. With version 2.0 of New-CertKitAppProxyIdentity.ps1, the certificate, app registration, permissions, and role assignment are configured in a single run.
Need help automating TLS certificate deployment for Entra Application Proxy, Always On VPN, DirectAccess, IIS, SQL, and more? I can help you design and implement a secure, least-privilege certificate automation strategy with CertKit across your internal and public-facing workloads. Fill out the form below, and I’ll provide you with more information.
Many third-party products authenticate users against Active Directory (AD) using the Lightweight Directory Access Protocol (LDAP) [RFC 4511]. Firewalls, VPN gateways, storage arrays, virtualization platforms, and countless line-of-business applications need a reliable way to query the directory and validate user credentials. Too often, these services are configured to use clear-text LDAP to a single domain controller, a design that exposes credentials on the network and fails when that domain controller goes offline. A better approach is to provide a highly available LDAP over Transport Layer Security (TLS) service, commonly called LDAPS, behind a load balancer, with certificates that renew automatically and never require manual intervention. Michael Waterman covers the architecture well in Building High Available LDAPS Architectures, and I build on that foundation here with automated certificate binding and renewal.
LDAP Security
Microsoft has been tightening LDAP security defaults for some time, and Windows Server 2025 continues that trend. Administrators deploying new domain controllers should be aware of the following changes.
LDAP Signing: Windows Server 2025 requires LDAP signing by default for new AD deployments. Domain controllers upgraded in place keep any existing signing policy.
Channel Binding: Windows Server 2025 sets LDAP channel binding to “When supported” by default. Domain controllers accept channel binding tokens when clients provide them but do not yet require them.
Channel Binding Auditing: Auditing for LDAP channel binding is enabled by default, allowing administrators to identify clients that do not support it.
Importantly, LDAP signing applies only to Simple Authentication and Security Layer (SASL) [RFC 4422] binds. Most third-party services use simple binds, which send the username and password in clear text when using LDAP on TCP port 389. Signing does nothing to protect these credentials, and Windows Server 2025 domain controllers that require signing reject simple binds over unencrypted connections entirely. Regardless of the domain controller’s signing configuration, clear-text LDAP is never recommended. LDAPS encrypts the entire session, including the bind, and should be used by any service that authenticates to AD.
LDAPS Clients
LDAPS clients are typically network appliances, non-Windows servers, and applications that need to authenticate users against AD but cannot take advantage of native AD features. These clients usually share the following traits.
Not Domain-Joined: The client is not a member of the domain and cannot use the domain controller locator to find a nearby, healthy domain controller.
Simple Bind: The client authenticates using a simple bind with a username and password instead of Kerberos.
Single Server: The client is configured with a single hostname or IP address for the directory server, with no awareness of AD sites or domain controller health. Some devices allow a secondary server, but failover behavior varies widely.
Separate Trust Store: The client does not automatically trust the enterprise public key infrastructure (PKI). Administrators must import the root and issuing Certification Authority (CA) certificates into the device’s trust store before LDAPS will work.
Examples beyond those mentioned previously include network access control platforms such as Cisco ISE and Aruba ClearPass, Linux hosts using the System Security Services Daemon (SSSD), and multifunction printers.
LDAPS Overview
LDAPS is simply LDAP protected by TLS, with the client connecting to the domain controller on TCP port 636. For the TLS handshake to succeed, the domain controller must present a certificate that meets the following requirements.
Server Authentication: The certificate must include the Server Authentication Enhanced Key Usage (EKU) (1.3.6.1.5.5.7.3.1).
Subject Name: The certificate must include the name the client uses to connect to the service in the Subject Alternative Name (SAN).
Private Key: The domain controller must have the certificate’s associated private key.
Trust: The certificate must chain to a root CA that the client trusts.
Certificate Selection
Domain controllers look for an LDAPS certificate in two places. A valid certificate in the NTDS service’s personal certificate store is always preferred. The local computer’s personal certificate store is used only when the NTDS store does not contain a suitable certificate. When multiple eligible certificates exist in the same store, the domain controller selects the one with the latest expiration date, which can lead to unexpected results when domain controllers have accumulated several Server Authentication certificates over time. Also, the certificate’s subject must match the domain controller’s FQDN for the certificate to be considered at all. Marc-André Moreau explains the selection process in detail in his excellent article, Active Directory LDAPS certificate selection deep dive.
Avoid Individual Domain Controllers
Configuring an LDAPS client to connect directly to a specific domain controller is a common practice, but it is problematic for many reasons. Domain controllers are routinely added, retired, and rebuilt, and each change requires updating every device that references the old server. In addition, a client configured with a single domain controller has a single point of failure. If that domain controller is offline for maintenance or fails unexpectedly, authentication for that service fails with it.
Domain Name Workaround
A simple workaround is to configure LDAPS clients to use the AD domain name (for example, corp.example.net) instead of an individual domain controller name (for example, dc1.corp.example.net). The AD domain name resolves to the IP addresses of all domain controllers in the domain, and no new certificate is required because the default Kerberos Authentication certificate template includes the domain name in the SAN. However, this approach relies on DNS alone. DNS has no awareness of domain controller health; clients may cache records for a failed server, and the domain name resolves to domain controllers in every site, including remote sites across slow WAN links. It works in a pinch, but it is not a substitute for a load balancer in enterprise deployments.
Load Balanced LDAPS
The recommended approach for enterprise deployments is to place domain controllers behind a load balancer and publish a dedicated LDAPS service name (for example, ldaps.corp.example.net) that resolves to the load balancer’s virtual IP address. Load balancer configuration is out of scope here, as it varies by vendor and operator preference. However, the load balancer must meet the following requirements.
TCP Port 636: The load balancer must distribute connections on TCP port 636.
TLS Passthrough: The load balancer must operate in TCP (layer 4) mode and must not terminate TLS. Terminating TLS on the load balancer prevents clients from validating the domain controller’s certificate and breaks LDAP channel binding.
Health Checks: I strongly recommend configuring health checks that validate the LDAPS service itself, not simply that TCP port 636 is open. Most commercial and open source load balancers support this configuration.
Note: Read-Only Domain Controllers (RODCs) should not be included in the load balanced pool. RODCs hold a read-only copy of the directory and return referrals for write operations, which can cause unexpected behavior for services that perform password changes or other directory updates.
Global Catalog
Some clients also require access to the global catalog (GC) over LDAPS on TCP port 3269. This is common in multi-domain forests, where a single LDAP server definition must locate and authenticate users from any domain, and with applications configured to use the GC port by default. In these scenarios, publish TCP port 3269 on the load balancer using the same TLS passthrough configuration and health checks, and ensure every domain controller in the pool is a GC server. The LDAPS certificate serves both ports, so no additional certificate configuration is required. Keep in mind that the GC holds only a partial set of attributes for objects in other domains. In a single-domain forest, TCP port 636 provides access to all directory data, and TCP port 3269 is not required.
Domain-Joined Clients
The load balanced LDAPS service is designed primarily for non-Windows systems using simple binds over LDAPS. Domain-joined Windows devices should not be configured to use the LDAPS service name. They should continue to use the DC locator and Kerberos natively, and the domain’s LDAP SRV records (for example, _ldap._tcp.corp.example.net), which domain controllers register and maintain automatically, must not be modified to point to the load balancer. Clients that attempt Kerberos authentication (SASL with the Generic Security Service Application Program Interface (GSSAPI)) to the service name will not work as expected because the required Service Principal Name (SPN) (ldap/ldaps.corp.example.net) can be registered on only one domain controller computer account. These clients will fall back to NTLM or fail entirely.
Certificate Requirements
Every domain controller in the load balanced pool must present a certificate that includes the LDAPS service name. To ensure consistent name coverage, the certificate’s subject should be the domain controller’s fully qualified domain name (FQDN), and the SAN should include the following names.
Domain controller FQDN (for example, dc1.corp.example.net)
Domain controller single-label hostname (for example, dc1)
Domain FQDN (for example, corp.example.net)
LDAPS service name (for example, ldaps.corp.example.net)
LDAPS service short name (for example, ldaps)
Not all of these names are strictly required for the load balanced service. However, the certificate bound to the NTDS store is used for every LDAPS connection to the domain controller, regardless of the name the client uses. Including all of these names ensures that clients connecting to the domain controller directly, to the domain name, or to the load balanced service name continue to work.
Note: The domain controller’s FQDN is used as the subject, rather than the LDAPS service name, so that each domain controller’s certificate is uniquely identifiable when approving requests, reviewing issued certificates, and troubleshooting connections through the load balancer. Modern TLS clients validate the server name against the SAN, not the subject, so the LDAPS service name only needs to appear in the SAN. Legacy clients that validate only the subject’s common name are rare but should be tested before deployment.
Create the Certificate Template
To create the certificate template, open the Certificate Templates management console (certtmpl.msc), right-click the Web Server template, choose Duplicate Template, and configure the following settings.
Compatibility Tab
On the Compatibility tab, select Windows Server 2016 for the Certification Authority and Windows 10/Windows Server 2016 for the Certificate recipient.
Certificate Template Compatibility Settings
Note: If any issuing CAs or domain controllers in the environment run an operating system older than Windows Server 2016, set the Compatibility Settings to match the oldest version in use. Selecting a version newer than the oldest CA or domain controller may prevent those servers from issuing or enrolling for the certificate.
General Tab
On the General tab, enter a descriptive name in the Template display name field (for example, LDAPS Service) and define the validity and renewal periods. The validity period should be no more than one year, and I recommend shorter lifetimes where practical. See The Case for Short-Lived Certificates in Enterprise Environments for more details.
Certificate Template General Settings
Note: The example shown here uses a short 14-day validity period with a 2-day renewal period. I strongly recommend testing the deployment with short-lived certificates (1 to 2 weeks) first. Short lifetimes allow administrators to observe several renewal cycles in a short period and confirm the automation is working as expected. Be sure the renewal period is shorter than the validity period. Once renewal automation is validated, update the template to use a longer validity period. Existing certificates adopt the new lifetime when they next renew.
Request Handling Tab
On the Request Handling tab, ensure that Allow private key to be exported is not selected.
Certificate Template Request Handling Settings
Cryptography Tab
On the Cryptography tab, select Key Storage Provider from the Provider Category drop-down list, RSA from the Algorithm name drop-down list, enter 2048 for the Minimum key size, and select SHA256 from the Request hash drop-down list. I recommend RSA 2048 because it provides the broadest compatibility with LDAPS clients. Elliptic Curve (EC) certificates are arguably a better choice from a security and performance perspective, but some services that require LDAPS may not support them.
Certificate Template Cryptography Settings
Subject Name Tab
On the Subject Name tab, select Supply in the request and check the box next to Use subject information from existing certificates for autoenrollment renewal requests. This allows the administrator to specify the subject and SAN when initially requesting the certificate, while ensuring the same names are included automatically when the certificate is renewed.
Certificate Template Subject Name Settings
Issuance Requirements Tab
On the Issuance Requirements tab, check the box next to CA certificate manager approval. Allowing the requester to supply the subject name means a certificate could be requested for any name, so requiring approval ensures that an administrator reviews each initial request before the certificate is issued. Next, select Valid existing certificate under Require the following for reenrollment. With this setting, renewal requests signed with the existing valid certificate are issued automatically without approval, which is essential for unattended renewal.
On the Extensions tab, confirm that Application Policies includes Server Authentication only. The Web Server template includes only Server Authentication by default, so no changes should be required.
Certificate Template Extensions Settings
Security Tab
On the Security tab, add the Domain Controllers group and grant Read, Enroll, and Autoenroll permissions. Do not grant permissions to the Read-Only Domain Controllers group.
Certificate Template Security Settings
Note: Only the Domain Controllers group should have Enroll permissions on this template. Do not grant Enroll or Autoenroll permissions to any other users or groups.
Publish Template
Once complete, publish the certificate template on the issuing CA. This can be done using the Certification Authority management console (certsrv.msc) or by running the following PowerShell command on the issuing CA.
Add-CATemplate -Name 'LDAPSService' -Force
Note: The Add-CATemplate cmdlet uses the template name, not the template display name. The template name is the display name without spaces by default.
Autoenrollment
Certificate autoenrollment must be enabled on domain controllers to renew LDAPS certificates automatically. I prefer to enable autoenrollment in a Group Policy Object (GPO) linked at the domain level, but at a minimum, the GPO must apply to the Domain Controllers organizational unit (OU). In the GPO, navigate to Computer Configuration > Policies > Windows Settings > Security Settings > Public Key Policies, open Certificate Services Client – Auto-Enrollment, and configure the following settings.
Note: Because the template requires the subject to be supplied in the request, autoenrollment will not enroll for the initial certificate. Autoenrollment only renews the certificate once it has been issued.
Certificate Enrollment
The initial certificate must be requested on each domain controller. Run the following PowerShell commands in an elevated PowerShell window on the domain controller. The domain controller’s hostname and domain name are determined automatically, so only the template name and LDAPS service name need to be updated to match your environment.
Note: The LDAPS service name does not have to be in the same DNS namespace as the AD domain. For example, ldaps.example.net is perfectly acceptable for the corp.example.net domain.
Because the template requires CA certificate manager approval, the request status will be Pending.
Certificate Request Pending Approval
Next, an administrator must approve the request. Open the Certification Authority management console (certsrv.msc) on the issuing CA and expand Pending Requests. Before issuing the certificate, inspect the request to ensure it is legitimate, confirming that the requester, subject name, and SAN entries match the expected domain controller and LDAPS service names. Once verified, right-click the request and choose All Tasks > Issue.
Issue Pending Certificate Request
Note: If role separation is enforced on the CA, or if the administrator requesting the certificate does not have certificate manager (Issue and Manage Certificates) permissions on the CA, another administrator may need to approve the request.
Once the request is approved, retrieve and install the certificate by running the following PowerShell commands on the domain controller.
Note: If the certificate cannot be retrieved in the same PowerShell session (for example, after waiting for approval), or if Get-Certificate returns an error because other requests are pending, use certreq.exe instead. Retrieve the issued certificate using the Request ID shown in the Certification Authority management console, then install it by running the following commands.
certreq.exe -retrieve 8636 .\ldaps.cer
certreq.exe -accept .\ldaps.cer
Bind the Certificate
Certificates issued from the new template are installed in the local computer’s personal certificate store. However, the domain controller’s existing certificates are also in that store, and any of them could be selected for LDAPS. To ensure the domain controller always presents the correct certificate, it must be added to the NTDS service certificate store. The Update-DcLdapsCertificate.ps1 PowerShell script, available on GitHub, automates this process. The script performs the following actions.
Searches the local computer’s personal certificate store for valid certificates issued from the specified template that include the LDAPS service name in the SAN, have an associated private key, include the Server Authentication EKU, and chain to a trusted root. If more than one certificate qualifies, the certificate with the latest expiration date is selected.
Imports the selected certificate into the NTDS service certificate store and confirms the import was successful.
Removes any other certificates from the NTDS service certificate store.
Forces Active Directory Domain Services (AD DS) to reload its certificate immediately, without a restart, then performs a TLS handshake on TCP port 636 to confirm the domain controller is serving the new certificate.
The script requires the ServiceCertStore PowerShell module. Install it by running the following PowerShell command.
Install-Module -Name ServiceCertStore
The script also requires the certificate template’s Object Identifier (OID). Find the OID on the Extensions tab of the template in the Certificate Templates management console (certtmpl.msc) under Certificate Template Information, or by running the following PowerShell command on the issuing CA.
Get-CATemplate
Certificate Template OID
Next, run Update-DcLdapsCertificate.ps1 manually to bind the initial certificate to the NTDS service certificate store.
Confirm that the certificate was added to the NTDS service certificate store by running the following PowerShell command.
Get-ServiceCertificates -ServiceName NTDS
NTDS Service Certificate Store
Automate Renewal
Autoenrollment renews the LDAPS certificate automatically, but it places the renewed certificate in the local computer’s personal certificate store, not the NTDS service certificate store. Left alone, the domain controller continues to serve the old certificate until it expires. The Register-DcLdapsCertificateTask.ps1 PowerShell script, also available on GitHub, closes this gap by creating a scheduled task that runs Update-DcLdapsCertificate.ps1 whenever a new certificate is installed. The scheduled task has the following characteristics.
The task is triggered by event ID 1006 (certificate installed) or event ID 1001 (certificate replaced) in the Microsoft-Windows-CertificateServicesClient-Lifecycle-System/Operational event log. Only certificates installed in the computer context that include the Server Authentication EKU trigger the task.
The task runs one minute after the event to ensure autoenrollment has finished installing the certificate and private key.
The task has no time-based trigger and never runs on a schedule.
The task runs as SYSTEM with highest privileges.
Run the following PowerShell command on each domain controller in the load balanced pool, specifying the same template OID and LDAPS service name used previously.
Note: By default, Register-DcLdapsCertificateTask.ps1 expects Update-DcLdapsCertificate.ps1 to be in the same folder. If Update-DcLdapsCertificate.ps1 is stored elsewhere, use the -ScriptPath parameter to specify its location. Be sure to store both scripts in a permanent location on the domain controller, as the scheduled task references the script at that path.
Validation
Once the certificate is bound and the scheduled task is registered, administrators should confirm that the LDAPS service is working as expected. I recommend using my Get-TlsCertificate.ps1 PowerShell script to view the certificate returned during the TLS handshake. Install the script from the PowerShell Gallery by running the following PowerShell command.
Install-Script -Name Get-TlsCertificate
Next, run the following PowerShell command to view the certificate presented by the load balanced LDAPS service.
Confirm that the subject, SAN, EKU, and expiration date are correct. Since the load balancer determines which domain controller responds, I also recommend running the command against each domain controller’s FQDN and comparing the thumbprint to the certificate in the NTDS service certificate store on that domain controller.
Finally, test LDAPS authentication using ldp.exe. Open ldp.exe, select Connection > Connect, enter the LDAPS service name in the Server field, enter 636 in the Port field, check the box next to SSL, and click OK.
ldp.exe Connection Settings
A successful connection confirms that TLS was negotiated with the LDAPS service name and returns the domain controller’s rootDSE information. The dnsHostName attribute identifies which domain controller the load balancer selected to service the request.
Successful LDAPS Connection
Next, select Connection > Bind, enter the username and password of a test account in the User and Password fields, choose Simple bind, and click OK.
ldp.exe Simple Bind Settings
A successful bind returns the message Authenticated as followed by the test account name, confirming that the LDAPS service is functioning correctly.
Successful LDAPS Simple Bind
Monitoring
Update-DcLdapsCertificate.ps1 records key outcomes in the Application event log using the event source Update-DcLdapsCertificate. Administrators can monitor these events to confirm renewals are processed successfully and to identify problems before the certificate expires.
Event ID
Level
Description
1000
Information
New certificate imported into the NTDS service certificate store and verified
1001
Information
Selected certificate is already bound to the NTDS service certificate store
1002
Information
Previous certificate removed from the NTDS service certificate store
1003
Information
LDAPS verified to be serving the new certificate
2000
Warning
Previous certificate not found in the NTDS service certificate store during cleanup
2001
Warning
Unable to signal AD DS to reload its server certificate
2002
Warning
LDAPS is serving a certificate other than the newly bound certificate
2003
Warning
Unable to complete a TLS handshake to verify the LDAPS certificate
3000
Error
The script terminated with an error
In addition, a detailed transcript of each run is written to %ProgramData%\RMHCI\PowerShell\Update-DcLdapsCertificate.log. Administrators can also monitor the LDAPS certificate externally using a certificate monitoring service such as CertKit, which supports internal TLS services, including LDAPS on domain controllers.
Summary
Providing a highly available LDAPS service for non-Windows systems eliminates clear-text credentials on the network and removes the single point of failure that comes with pointing devices at individual domain controllers. Placing domain controllers behind a load balancer with a dedicated service name, issuing certificates that cover every name clients may use, and automating the binding of renewed certificates to the NTDS service certificate store ensures the service remains available and secure without ongoing manual intervention.
I’m excited to announce that I’ll be delivering another edition of my Mastering Enterprise PKI Certificates with Microsoft Intune training course, hosted by the ViaMonstra Online Academy. This three-day live online course takes place February 3-5, 2027. It covers all aspects of issuing and managing enterprise PKI certificates with Microsoft Intune, using both on-premises Active Directory Certificate Services (AD CS) and Microsoft Cloud PKI for Intune. If you register before December 31, 2026, you’ll also receive a free one-year ViaMonstra All-Access Pass!
Course Overview
This interactive course gives IT professionals the practical skills they need to deploy, secure, and troubleshoot certificate infrastructure for Intune-managed endpoints. Each day includes live instruction, live demonstrations based on real-world scenarios, and plenty of time for questions. I also share the security best practices and hard-won lessons I’ve learned from years of deploying these solutions for customers.
What You’ll Learn
The course covers the following topics in depth.
Certificate and PKI Fundamentals: Certificate use cases, AD CS, Cloud PKI for Intune, and other PKI solutions.
AD CS for Intune: Root and issuing CAs, certificate templates, revocation, and CA security.
Intune Certificate Connector: Connector installation and configuration for both PKCS and SCEP, including service account requirements, along with imported PKCS and trusted certificate profiles.
PKCS Certificate Deployment: CA configuration, device configuration profiles, key storage, subject names, strong certificate mapping, and hardening.
NDES Deployment and Security Hardening: Networking and certificate requirements, NDES installation, security hardening, and publishing NDES to the Internet securely. I spend an entire day on NDES and SCEP alone!
Troubleshooting: Diagnosing connector installation, connectivity, enrollment, and revocation issues using event logs and other tools.
Cloud PKI for Intune: Licensing requirements, benefits and limitations, creating CAs, Active Directory integration, certificate templates, monitoring, and Bring Your Own CA (BYOCA).
Course Highlights
Here are some key highlights for those attending the training.
Live Instruction: Daily live webinars with time for Q&A, so you can ask me questions directly.
Live Demonstrations: Practical demonstrations based on real-world deployment scenarios.
Sample Scripts: Access to the sample scripts used in class, which you can reuse and modify in your own environment.
Session Recording: Each session is recorded, so you can review the material later.
Community: Connect with other IT professionals working on the same challenges.
Who Should Attend
This course is ideal for IT administrators, security professionals, and systems engineers who deploy or manage certificates with Intune, AD CS, or Cloud PKI for Intune. It’s also a good fit for those planning to move from on-premises NDES and SCEP to Cloud PKI for Intune, anyone who needs to harden an existing certificate deployment, and administrators migrating NDES and Intune Certificate Connector servers off Windows Server 2016 before it reaches end of life in January 2027.
Prerequisites
To get the most out of the course, attendees should have access to the following.
A working on-premises AD CS implementation.
An Azure subscription with a Microsoft Intune Suite license.
Intune licenses for PKCS and SCEP certificate deployment.
Register for this course before December 31, 2026, and you’ll receive a free one-year ViaMonstra All-Access Pass subscription, a $695 value! The All-Access Pass gives you a full year of access to ViaMonstra Online Academy’s training catalog, so you can keep learning long after class ends. Don’t wait, though. This offer expires at the end of the year.
Course Details
Here’s some additional information about the training event.
When: February 3-5, 2027, 9:00 AM to 4:30 PM Central Time (US and Canada).
Where: Live online via ViaMonstra Online Academy.
Cost: $2,395.00 (includes a free one-year All-Access Pass, a $695 value, when you register by December 31, 2026).
In a recent post, I described how to configure CertKit to automatically deploy renewed TLS certificates to Microsoft Entra Application Proxy applications using an Entra app registration with client secret authentication. That method works anywhere, but it relies on a client secret that must be stored securely and rotated before it expires. When the CertKit agent runs on an Azure virtual machine or an Azure Arc-enabled server, CertKit can authenticate with a managed identity instead, eliminating the client secret entirely. This configuration uses the same least-privilege permissions as the client secret method. The following sections describe how to configure it using both PowerShell and the Azure portal. CertKit also supports certificate authentication, which protects the private key with a TPM and works on any Windows server without Azure. It’s my recommended approach when the CertKit agent doesn’t run in Azure.
Why Use a Managed Identity
A managed identity is an identity in Microsoft Entra ID that Azure manages on behalf of an Azure resource. It offers several advantages over a client secret, including the following.
No secret to manage. There’s no client secret to store, protect, or rotate, and no expiration date that can unexpectedly break certificate deployments.
Bound to a specific resource. The identity can only be used from the Azure resource it’s attached to. It can’t be copied out of a configuration file or password vault and used elsewhere.
Aligned with Microsoft guidance. Microsoft recommends managed identities over client secrets for workloads that support them.
There are tradeoffs, however. A managed identity is available only to Azure resources, so the CertKit agent must run on an Azure virtual machine or a server onboarded to Azure Arc. In addition, anyone who compromises that server can request tokens as the managed identity. Least privilege limits the impact, just as it does with a client secret. Managed identity authentication is a good choice when the CertKit agent already runs on an Azure virtual machine. For servers outside Azure, onboarding them to Azure Arc solely for CertKit adds management overhead, so certificate authentication is the better choice. It protects the private key with a TPM and doesn’t require an Azure subscription.
Requirements
Using a managed identity with CertKit requires the following.
An Azure virtual machine or Azure Arc-enabled server. The CertKit agent must run on a server with a managed identity. Azure virtual machines support managed identities natively and don’t require Azure Arc. On-premises servers, or servers hosted in other clouds, must be onboarded to Azure Arc. The server doesn’t need to be domain-joined.
An Azure subscription in the same tenant. The Azure subscription must be associated with the same Microsoft Entra tenant where Application Proxy is configured.
Outbound internet access. The CertKit agent requires outbound HTTPS access to CertKit and Microsoft Graph. No inbound access or public IP address is required.
The Microsoft Graph PowerShell module on the agent host. The CertKit agent uses the Microsoft.Graph.Authentication module to sign in with the managed identity. Since the agent runs as Local System, the module must be installed for all users.
Microsoft Entra ID P1. This is already required for Application Proxy and custom roles. Assigning the role through Privileged Identity Management (PIM) requires Microsoft Entra ID P2 or Microsoft Entra ID Governance.
I recommend using a user-assigned managed identity. It’s a standalone Azure resource dedicated to CertKit, and it persists if the virtual machine is rebuilt or replaced. Azure Arc-enabled servers support only a system-assigned managed identity, which is shared with the Azure Arc agent and other services on the server.
Required Permissions for CertKit
The managed identity requires the same least-privilege permissions as the client secret method, including the following.
Application.Read.All. A read-only Microsoft Graph application permission CertKit uses to find App Proxy applications in the tenant.
A custom Entra role. A custom role, named App Proxy Certificate Manager in this example, with only three permissions: read Application Proxy settings, update the Application Proxy SSL certificate, and read connector groups.
This configuration follows security best practices and enforces least privilege. The managed identity can’t add credentials to applications, change API permissions, or grant consent. For more details on these permissions and why built-in roles such as Application Administrator should be avoided, see the client secret post. If you’ve already created the custom role for another authentication method, you can reuse it.
Create the Managed Identity
A user-assigned managed identity is an Azure resource, so it’s created in the Azure portal rather than the Entra admin center. Create it and attach it to the virtual machine running the CertKit agent using the following steps.
Create the User-Assigned Managed Identity
To begin, create the managed identity.
In the Azure portal, search for Managed Identities and click Create.
Select the subscription, resource group, and region, and enter a name, such as certkit-app-proxy.
Click Review + create, then Create.
On the managed identity’s Overview page, record the Client ID. CertKit and the configuration script both use this value.
Attach the Managed Identity to the Virtual Machine
Next, attach the managed identity to the virtual machine running the CertKit agent.
Open the virtual machine and navigate to Security > Identity.
Select the User assigned tab and click Add.
Select the managed identity and click Add.
Alternatively, attach the managed identity using the Azure CLI in Azure Cloud Shell. Replace the resource group, virtual machine name, and managed identity resource ID with your own. The resource ID is shown on the managed identity’s Properties page.
az vm identity assign --resource-group <resourceGroup> --name <vmName> --identities <managedIdentityResourceId>
Install the Microsoft Graph PowerShell Module on the Agent Host
With managed identity authentication, the CertKit agent signs in to Microsoft Graph locally on the server using the Microsoft.Graph.Authentication PowerShell module. The agent runs as Local System, so the module must be installed for all users. On the server running the CertKit agent, open an elevated Windows PowerShell command window and run the following command.
Be sure to use Windows PowerShell, not PowerShell 7. The two use separate module locations, and the CertKit agent uses Windows PowerShell. If the module is missing, CertKit deployments fail with an error indicating that Microsoft.Graph.Authentication is not installed.
Configuration Using PowerShell
You can grant the managed identity its permissions in a single run using my New-CertKitAppProxyIdentity.ps1 PowerShell script on GitHub. Specify the managed identity’s client ID with the -ManagedIdentityId parameter, and the script creates the custom role if it doesn’t already exist, grants Application.Read.All, and assigns the role. Add -UsePim to assign the role through PIM, and -TenantId if your account has access to more than one tenant. The script confirms the identity is a managed identity before making any changes. Alternatively, follow the manual steps below, which show exactly what the script does. Either way, you’ll need the Microsoft.Graph.Authentication module on your workstation. Install it using the following command.
When the script finishes, it displays the managed identity’s name and client ID. Skip ahead to Configure CertKit to complete the configuration. To configure the managed identity manually instead, follow the steps below.
Connect to Microsoft Graph
First, connect to Microsoft Graph with an account that can create custom roles, grant application permissions, and assign directory roles, such as Privileged Role Administrator or Global Administrator. If your account has access to more than one tenant, add -TenantId with the tenant ID or domain name to sign in to the correct tenant.
Next, grant the managed identity the read-only Microsoft Graph application permission Application.Read.All. Assigning the permission this way also grants admin consent.
$GraphSp = (Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/servicePrincipals?`$filter=appId eq '00000003-0000-0000-c000-000000000000'&`$select=id,appRoles").value[0]
Invoke-MgGraphRequest -Method POST -Uri 'https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments' -Body $Body
If your tenant is licensed for Microsoft Entra ID P2 or Microsoft Entra ID Governance, assign the role through Privileged Identity Management (PIM) instead. Role assignments made outside PIM aren’t tracked by PIM and trigger a high-severity alert. Managed identities support only active assignments in PIM, so the following command creates a permanent active assignment. If the custom role was just created, PIM can take several minutes to recognize it. If the command fails with a RoleNotFound error, wait a few minutes and try again.
$Body = @{
action = 'adminAssign'
justification = 'CertKit certificate deployment to Entra Application Proxy'
Invoke-MgGraphRequest -Method POST -Uri 'https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignmentScheduleRequests' -Body $Body
Configuration Using the Entra Admin Center
The Microsoft Entra admin center can’t grant Microsoft Graph application permissions to a managed identity, so the Application.Read.All permission must be granted using PowerShell, as shown above. The custom role can be created and assigned in the Entra admin center, however. Create the custom role as described in the client secret post if it doesn’t already exist, then assign it using the following steps.
Navigate to Entra ID > Roles & admins, then search for and select App Proxy Certificate Manager.
Click Add assignments, then Select member(s).
Search for the managed identity by name, select it, and click Select.
If Privileged Identity Management (PIM) is enabled, click Next, set the assignment type to Active and Permanently assigned, enter a justification, and click Assign. Without PIM, click Add.
Configure CertKit
With the managed identity configured, create a new deployment in CertKit using the Microsoft Entra Application Proxy (Managed Identity Auth) template for the agent running on the virtual machine. Select the certificate to deploy, then enter the user-assigned managed identity’s client ID in the Managed identity field. To use a system-assigned managed identity instead, such as on an Azure Arc-enabled server, leave the field set to system. No tenant ID or client secret is required. Then list the App Proxy applications to update by name, separated by commas, or enter an asterisk (*) as an app list wildcard to update all of them. If you update all applications, be sure to use a wildcard or multi-SAN certificate that covers the external URL of every App Proxy application you want CertKit to manage.
Deploy and Validate
After saving the CertKit deployment, wait a few minutes for the role assignment and API permission to take effect, then run the deployment. A successful run shows CertKit signing in as the user-assigned managed identity, then lists each App Proxy application, whether its external URL is covered by the certificate, and the thumbprint Entra reports after the update.
Update command output:
Microsoft Entra Application Proxy Deployment | Apps: *
Signed in as the user-assigned managed identity <redacted> (tenant <redacted>)
Graph permissions: Application.Read.All
Warning: The identity has no Microsoft Graph permission to update apps. Unless an Entra role allows it, uploads will be refused. Grant the application permission Application.ReadWrite.OwnedBy (admin consented) and add the identity as an owner of each App Proxy app.
[Step 3] Finding App Proxy apps...
Found 8 App Proxy app(s)
App1 (https://app1.example.net/): covered by this certificate
Private Access App 1: skipped, a Global Secure Access (Private Access) app, which has no TLS certificate
Private Access App 2: skipped, a Global Secure Access (Private Access) app, which has no TLS certificate
App2 (https://app2.example.net/): covered by this certificate
App3 (https://app3.example.net/): covered by this certificate
App4 (https://app4.example.net/): covered by this certificate
App5 (https://app5.example.net/): covered by this certificate
App6 (https://app6.example.net/): covered by this certificate
DONE | Updated 6 app(s), 0 already had the certificate. Entra takes a minute or two to start serving it.
CertKit displays a warning that the identity has no Graph permission to update apps, but you can safely ignore it, because the custom role grants that access. App Proxy can take several minutes to begin serving the new certificate. To confirm the certificate the endpoint is serving, use my Get-TlsCertificate PowerShell script, as described in the client secret post.
Get-TlsCertificate -Hostname app1.example.net
Removing the Configuration
To remove CertKit’s permissions from the managed identity, use my Remove-CertKitAppProxyIdentity.ps1 PowerShell script with the -ManagedIdentityId parameter. The script removes the role assignment and the Application.Read.All permission. It doesn’t delete the managed identity, which is an Azure resource, and it keeps the custom role if another identity still uses it. This makes it safe to move between authentication methods, for example from a managed identity to certificate authentication, without breaking another deployment that uses the same role.
When the CertKit agent runs on an Azure virtual machine or an Azure Arc-enabled server, a managed identity eliminates the client secret, removing the need to store, protect, and rotate it. The managed identity uses the same custom Entra role and read-only Application.Read.All permission as the client secret method, so this configuration follows security best practices and enforces least privilege. For servers outside Azure, certificate authentication also eliminates the client secret, using a TPM-protected private key without requiring Azure Arc.
Need help automating TLS certificate deployment for Entra Application Proxy, Always On VPN, DirectAccess, IIS, SQL, and more? I can help you design and implement a secure, least-privilege certificate automation strategy with CertKit across your internal and public-facing workloads. Fill out the form below, and I’ll provide you with more information.
Microsoft Entra Application Proxy applications published with custom domains require a public TLS certificate, and keeping those certificates current is a manual, error-prone task when done in the Entra admin center. With the industry moving to 47-day public TLS certificates by 2029, automation is quickly becoming a requirement rather than a convenience. I recently configured CertKit to automatically deploy renewed certificates to my Entra App Proxy applications using an Entra app registration with client secret authentication. This configuration follows security best practices and enforces least privilege, granting CertKit only the access it needs to find App Proxy applications and update their certificates. The following sections describe how to configure it using both PowerShell and the Entra admin center. CertKit also supports managed identity authentication, which I cover in Automating Entra App Proxy Certificates with CertKit (Managed Identity), and certificate authentication, which I cover in Automating Entra App Proxy Certificates with CertKit (Certificate Authentication). Certificate authentication replaces the client secret with a TPM-protected private key that can’t be copied, and it’s now my recommended approach for most deployments.
CertKit Deployment Options
CertKit can deploy a certificate to Entra App Proxy in one of two ways.
Individual applications. CertKit updates only the App Proxy applications you specify.
All applications. CertKit enumerates every App Proxy application in the tenant, determines which ones have an external URL covered by the certificate, and updates each of them.
If you choose to update all applications, be sure to use a wildcard or multi-SAN (subject alternative name) certificate that covers the external URL of every App Proxy application you want CertKit to manage. CertKit updates only applications whose external URL matches a name on the certificate, so a certificate with a single name updates only the application that uses that name. CertKit also skips Global Secure Access (Private Access) applications, such as Enterprise Quick Access. These applications appear alongside App Proxy applications, but they don’t use a TLS certificate, so there’s nothing to update.
Why 6-Day Certificates
In my lab, I’m using Let’s Encrypt’s short-lived 6-day certificates. Testing and evaluating certificate automation is much easier with short-lived certificates, because renewals happen every few days rather than every few months. Any problem with the renewal or deployment process shows up quickly, and I can confirm the automation works reliably across many renewal cycles in a short time. Short-lived certificates leave little margin for error, though, so I don’t recommend them in production until the automation is proven.
Required Permissions for CertKit
Create a dedicated Entra app registration for CertKit. CertKit uses this identity to sign in to Microsoft Graph, and it requires only the following permissions.
Application.Read.All. A read-only Microsoft Graph application permission CertKit uses to find App Proxy applications in the tenant.
A custom Entra role. A custom role, named App Proxy Certificate Manager in this example, with only three permissions: read Application Proxy settings, update the Application Proxy SSL certificate, and read connector groups.
This configuration enforces least privilege. Built-in roles such as Application Administrator also work, but they grant far more access than CertKit needs, including the ability to add credentials to any application in the tenant, a well-known privilege escalation path. With the custom role, CertKit can’t add credentials, change API permissions, or grant consent. Custom roles require Microsoft Entra ID P1, which is already required for Application Proxy. CertKit displays a warning that the identity has no Graph permission to update apps, but you can safely ignore it, because the custom role grants that access.
Configuration Using PowerShell
You can perform this configuration in a single run using my New-CertKitAppProxyIdentity.ps1 PowerShell script on GitHub, which creates the app registration, custom Entra role, Application.Read.All permission, role assignment, and client secret for CertKit. If your account has access to more than one tenant, use the -TenantId parameter to specify the tenant to configure. The script displays the connected tenant before making any changes. Alternatively, follow the manual steps below, which show exactly what the script does. Either way, you’ll need the Microsoft.Graph.Authentication module from the Microsoft Graph PowerShell SDK, since every call uses Invoke-MgGraphRequest. Install it using the following command.
To use the script, run New-CertKitAppProxyIdentity.ps1 -UseClientSecret, adding -UsePim to assign the role through PIM. Beginning with version 2.0, the script uses certificate authentication by default, so -UseClientSecret is required to create a client secret. Client secrets are limited to a maximum of 12 months, and you can choose a shorter period with -SecretExpirationMonths. When the script finishes, it copies the client secret to the clipboard and displays the tenant ID and client ID. Skip ahead to Configure CertKit to complete the configuration. To configure the app registration manually instead, follow the steps below.
Connect to Microsoft Graph
First, connect to Microsoft Graph with an account that can create custom roles, grant application permissions, and assign directory roles, such as Privileged Role Administrator or Global Administrator. If your account has access to more than one tenant, add -TenantId with the tenant ID or domain name to sign in to the correct tenant.
App registrations created with Graph don’t get a service principal automatically, so create one. The role and API permission are assigned to the service principal, not the app registration.
$Role = Invoke-MgGraphRequest -Method POST -Uri 'https://graph.microsoft.com/v1.0/roleManagement/directory/roleDefinitions' -Body $RoleBody
Grant the Application.Read.All Permission
Next, grant the service principal the read-only Microsoft Graph application permission Application.Read.All. Assigning the permission this way also grants admin consent.
$GraphSp = (Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/servicePrincipals?`$filter=appId eq '00000003-0000-0000-c000-000000000000'&`$select=id,appRoles").value[0]
Invoke-MgGraphRequest -Method POST -Uri 'https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments' -Body $Body
If your tenant is licensed for Microsoft Entra ID P2 or Microsoft Entra ID Governance, assign the role through Privileged Identity Management (PIM) instead. Role assignments made outside PIM aren’t tracked by PIM and trigger a high-severity alert. Service principals support only active assignments in PIM, so the following command creates a permanent active assignment.
$Body = @{
action = 'adminAssign'
justification = 'CertKit certificate deployment to Entra Application Proxy'
Invoke-MgGraphRequest -Method POST -Uri 'https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignmentScheduleRequests' -Body $Body
Create the Client Secret
Finally, create a client secret. I’ve chosen a 1-year expiration, which I recommend as the maximum. To use a shorter period, change the AddYears(1) value, for example to AddMonths(6) for a 6-month expiration. The secret is copied to the clipboard rather than displayed on screen, which keeps it out of console history and screen recordings. The secret value can’t be retrieved later, so paste it into CertKit right away.
$Secret = Invoke-MgGraphRequest -Method POST -Uri "https://graph.microsoft.com/v1.0/applications/$($NewApp.id)/addPassword" -Body $Params
$Secret.secretText | Set-Clipboard
After pasting the secret into CertKit, clear the clipboard.
Set-Clipboard -Value $null
Configuration Using the Entra Admin Center
The same configuration can be performed in the Microsoft Entra admin center using an account that can create custom roles, grant application permissions, and assign directory roles, such as Privileged Role Administrator or Global Administrator.
Create the App Registration
To begin, create the app registration. The admin center creates the service principal (enterprise application) automatically.
Navigate to Entra ID > App registrations and click New registration.
Enter CertKit App Proxy Deployment for the name.
Select Accounts in this organizational directory only.
Leave the redirect URI blank and click Register.
On the Overview page, record the Application (client) ID and Directory (tenant) ID.
Grant the Application.Read.All Permission
Next, grant the app registration the read-only Application.Read.All permission.
In the app registration, navigate to API permissions. Select the delegated User.Read permission the admin center adds by default and click Remove permission, since CertKit doesn’t use it.
Click Add a permission, then Microsoft Graph > Application permissions.
Search for and select Application.Read.All, then click Add permissions.
Click Grant admin consent for your tenant and click Yes.
Create the Client Secret
Next, create a client secret for CertKit to authenticate with. I’ve chosen a 1-year expiration, which I recommend as the maximum, but you can choose a shorter period as you see fit.
In the app registration, navigate to Certificates & secrets > Client secrets and click New client secret.
Enter CertKit for the description and select 365 days (12 months) for the expiration.
Click Add, then copy the Value immediately. Don’t copy the Secret ID. The value is displayed only once.
Create the Custom Role
Now create the custom role.
Navigate to Entra ID > Roles & admins and click New custom role.
Enter App Proxy Certificate Manager for the name, add a description, and click Next.
On the Permissions page, search for and select microsoft.directory/applications/applicationProxy/read, microsoft.directory/applications/applicationProxySslCertificate/update, and microsoft.directory/connectorGroups/allProperties/read, then click Next.
Review the settings and click Create.
Assign the Custom Role
Finally, assign the custom role to the new identity.
Navigate to Entra ID > Roles & admins, then search for and select App Proxy Certificate Manager.
Click Add assignments, then Select member(s).
Search for CertKit App Proxy Deployment, select it, and click Select.
If Privileged Identity Management (PIM) is enabled, click Next, set the assignment type to Active and Permanently assigned, enter a justification, and click Assign. Without PIM, click Add.
Configure CertKit
With the app registration in place, create a new deployment in CertKit using the Microsoft Entra Application Proxy (Client Secret Auth) template. Select the certificate to deploy, and enter the directory (tenant) ID, application (client) ID, and client secret from the app registration. Then list the App Proxy applications to update by name, separated by commas, or enter an asterisk (*) as an app list wildcard to update all of them.
Deploy and Validate
After saving the CertKit deployment and deploying the changes, wait a few minutes for the role assignment and API permission to take effect, then run the deployment. A successful run lists each App Proxy application, whether its external URL is covered by the certificate, and the thumbprint Entra reports after the update.
Update command output:
Microsoft Entra Application Proxy Deployment | Apps: *
Signed in as the app registration <redacted> (tenant <redacted>)
Graph permissions: Application.Read.All
Warning: The identity has no Microsoft Graph permission to update apps. Unless an Entra role allows it, uploads will be refused. Grant the application permission Application.ReadWrite.OwnedBy (admin consented) and add the identity as an owner of each App Proxy app.
[Step 3] Finding App Proxy apps...
Found 7 App Proxy app(s)
App1 (https://app1.example.net/): covered by this certificate
Private Access App: skipped, a Global Secure Access (Private Access) app, which has no TLS certificate
App2 (https://app2.example.net/): covered by this certificate
App3 (https://app3.example.net/): covered by this certificate
App4 (https://app4.example.net/): covered by this certificate
App5 (https://app5.example.net/): covered by this certificate
App6 (https://app6.example.net/): covered by this certificate
DONE | Updated 6 app(s), 0 already had the certificate. Entra takes a minute or two to start serving it.
Validate the Entra Configuration
To confirm Entra stored the new certificate, open the application in Entra ID > Enterprise applications and select Application proxy, or query the application’s App Proxy settings with PowerShell. Replace <objectId> with the app registration’s object ID.
(Invoke-MgGraphRequest -Method GET -Uri $Uri).onPremisesPublishing.verifiedCustomDomainCertificatesMetadata.thumbprint
Validate the Live Endpoint
App Proxy can take several minutes to begin serving the new certificate after the configuration is updated. To check the certificate the endpoint is actually serving, view it in a browser or use my Get-TlsCertificate PowerShell script.
Get-TlsCertificate is available in the PowerShell Gallery and on GitHub. Install it using the following command.
Install-Script -Name Get-TlsCertificate
Once installed, run it against the application’s external hostname.
Get-TlsCertificate -Hostname app1.example.net
The expiration date CertKit displays may differ by one day from the date Entra reports. That’s expected, because Entra reports dates in UTC.
Secret Rotation and Security
The client secret must be rotated before it expires, or CertKit deployments will fail. To rotate it, create a new secret on the app registration, update CertKit with the new value, confirm a deployment succeeds, and then delete the old secret. You can also rotate it with the script by running New-CertKitAppProxyIdentity.ps1 -UseClientSecret again, which creates a new secret and automatically removes any expired ones. Adding -RemoveExistingSecrets also removes the old valid secrets once the new one exists, so update CertKit right away. Set a calendar reminder well ahead of the expiration date. Least privilege limits the impact if the secret is ever exposed. Anyone holding it could replace the TLS certificate on App Proxy applications and read app registration details, but couldn’t add credentials to other applications, change permissions, or grant consent. Even so, store the secret securely and limit who can access it. To eliminate the secret entirely, consider certificate authentication, which uses a TPM-protected private key that can’t be copied off the CertKit agent server. The same post describes how to migrate from a client secret without downtime.
Summary
CertKit can fully automate certificate deployment to Entra Application Proxy, either for individual applications or for every App Proxy application in the tenant. By combining a custom Entra role limited to App Proxy certificate updates with the read-only Application.Read.All permission, this configuration follows security best practices and enforces least privilege, without the broad access of built-in roles such as Application Administrator. Using short-lived 6-day certificates makes it easy to confirm the automation works, and rotating the client secret before it expires keeps the deployment running. For stronger protection, certificate authentication replaces the client secret with a TPM-protected private key and is now my recommended approach.
Need help automating TLS certificate deployment for Entra Application Proxy, Always On VPN, DirectAccess, IIS, SQL, and more? I can help you design and implement a secure, least-privilege certificate automation strategy with CertKit across your internal and public-facing workloads. Fill out the form below, and I’ll provide you with more information.
Accurate time is critical in an Active Directory environment. Kerberos authentication depends on it, and by default it tolerates no more than five minutes of clock skew between a client and a domain controller. Certificate validity periods, CRL publication, OCSP responses, and log correlation all depend on it too, which becomes even more important as organizations move to short-lived certificates. During a recent engagement to assess and remediate a customer’s Active Directory Certificate Services (AD CS) deployment, I noticed intermittent Kerberos authentication anomalies that didn’t line up with anything in the PKI itself. The root cause turned out to be time synchronization, which nobody had configured correctly across the domain. This post explains what I found and how I fixed it. I’ve reproduced the customer’s configuration in my lab, so the examples and output come from lab.richardhicks.net, but the process is the same one I used in the customer’s environment.
Last Updated: December 1, 2026. The post now includes a section on Network Time Security.
What I Found
When I reviewed time configuration across the customer’s domain, I found several problems, including the following.
Inconsistent domain controller configuration. Some domain controllers had never been configured and were still running the defaults. Others had been pointed manually at different external time sources, presumably by different administrators at different times. This resulted in more than one time root in the domain, which is exactly what the Windows time hierarchy is designed to prevent.
The PDC emulator was not authoritative. The domain controller holding the PDC emulator role had no external time source configured, so it wasn’t anchoring the domain to UTC.
Hyper-V was quietly providing the time. Most of the domain controllers were virtual machines running on Hyper-V. The Hyper-V time synchronization integration service (VMICTimeProvider) was enabled on all of them, and W32Time on the domain controllers was taking time from the host instead of the domain hierarchy.
The Hyper-V hosts had no time configuration at all. Most of the domain was running on Hyper-V hosts that were workgroup members. Workgroup machines don’t participate in the domain time hierarchy, and nobody had configured them. They were running on their own clocks, polling time.windows.com infrequently, if they could reach it at all.
The result was a loop with no anchor. The domain controllers took their time from the hosts, the hosts drifted on their own, and nothing in the environment was reliably tied to UTC. Different domain controllers on different hosts could disagree by a meaningful amount, which explained the inconsistent Kerberos behavior. In my lab, the PDC emulator showed the problem clearly.
PS C:\> w32tm.exe /query /status
Leap Indicator: 0(no warning)
Stratum: 1 (primary reference - syncd by radio clock)
...
ReferenceId: 0x564D5450 (source name: "VMTP")
...
Source: VM IC Time Synchronization Provider
Don’t be fooled by Stratum 1. The VM IC provider always reports Stratum 1, but the real source is the Hyper-V host’s clock. A quick comparison against a public time server showed the PDC emulator was about 840 milliseconds off UTC.
That’s not enough to break Kerberos on its own, but it was drifting, and in the customer’s environment, with multiple hosts and multiple time roots, the differences were much larger.
How Time Sync Should Work
Before making changes, it’s worth reviewing how Windows time synchronization is designed to work in an Active Directory domain. The hierarchy is simple and consists of the following.
The forest root PDC emulator is the authoritative time source. It is the only domain controller that should synchronize with an external source, and it advertises itself as a reliable time server (AnnounceFlags 5).
All other domain controllers follow the domain hierarchy. They use the NT5DS type and synchronize with the PDC emulator (directly or through their domain’s PDC emulator in a multi-domain forest). They advertise as time servers, but not as reliable ones (AnnounceFlags 10, the default).
Domain members synchronize with a domain controller. This is the default behavior for every domain-joined machine, although virtual machines need one adjustment, which I cover next.
Virtual Machines
Virtualization adds a wrinkle. On Hyper-V, the time synchronization integration service registers its own W32Time provider, VMICTimeProvider, which feeds the guest time from the host. It’s enabled by default on every virtual machine, and on a domain-joined VM it competes with the domain hierarchy and usually wins. Microsoft’s guidance is to disable VMICTimeProvider on virtual domain controllers so they get their time from the PDC emulator instead. I recommend disabling it on domain member VMs as well, so every domain-joined machine follows the same hierarchy.
Workgroup Hyper-V Hosts
The Hyper-V hosts matter too. If they’re domain members, they’ll follow the domain hierarchy automatically. If they’re workgroup members, as they were here, they need to be configured explicitly. Even with VMICTimeProvider disabled, the host’s clock still sets each VM’s time at startup and after a restore from a saved state, and the host needs accurate time for its own logs and certificates.
Target Configuration
The end state looks like this. The PDC emulator and the Hyper-V hosts both sync with the same public source, and every domain-joined machine, physical or virtual, follows the domain hierarchy.
System
Time source
Configured by
PDC emulator
time.cloudflare.com
DC Time Sync GPO
Other domain controllers
PDC emulator
DC Time Settings GPO
Domain members (physical and virtual)
Domain controllers
Domain Member Time Settings GPO
Hyper-V hosts (workgroup)
time.cloudflare.com
Local configuration
Resetting Domain Controllers to the Default Configuration
With domain controllers configured inconsistently, the cleanest approach is to return every one of them to the default configuration and then manage time centrally with Group Policy. Resetting first is important. Local settings remain in the registry underneath any policy, and if a domain controller ever stops receiving the policy (for example, after the PDC emulator role moves), it falls back to whatever was configured locally. Leftover manual peer settings would quietly create a second time root.
Restoring the Defaults
The following commands reset W32Time on every domain controller in the domain. They re-enable the Hyper-V time provider (the default), restore domain hierarchy synchronization, reset the peer list to the stock time.windows.com,0x9 value, and set AnnounceFlags back to 10 with /reliable:no.
I recommend this targeted approach over w32tm.exe /unregister and w32tm.exe /register. Re-registering the service rebuilds the entire W32Time configuration, but it can also remove the VMICTimeProvider subkey. That key is created by the Hyper-V integration components, not by W32Time, and it’s the key we’ll target with Group Policy in the next step.
Verifying the Reset
Next, confirm each domain controller is running the defaults and that no existing Group Policy is configuring W32Time.
Each domain controller should report Type: NT5DS (Local) and AnnounceFlags: 10 (Local), and the time policy check should return False. If it returns True, another GPO is already configuring W32Time. Find it and remove those settings before continuing. Don’t be surprised if the source still shows VM IC Time Synchronization Provider on some domain controllers at this point. That’s the default behavior we’re about to fix.
Configuring Time Sync with Group Policy
With every domain controller back to a known state, the next step is to configure time centrally with three GPOs. Two are linked to the Domain Controllers OU, and the third is linked to the domain root for domain members. The design includes the following.
GPO
Applies to
Settings
DC Time Settings
All domain controllers
Type NT5DS, AnnounceFlags 10, NTP client and server enabled, VMICTimeProvider disabled
DC Time Sync
PDC emulator only (WMI filter)
Type NTP, NtpServer time.cloudflare.com,0x8 time.nist.gov,0xa, AnnounceFlags 5
Domain Member Time Settings
All domain members (linked to the domain root)
VMICTimeProvider disabled
DC Time Sync is linked with a higher precedence (link order 1), so on the PDC emulator its values override the baseline from DC Time Settings. Every other domain controller receives only the baseline. A nice benefit of this design is that it follows the PDC emulator role automatically. If the role moves to another domain controller, the WMI filter matches the new role holder, and the old one falls back to the baseline with no administrator intervention. However, if the PDC emulator role moves to another DC, don’t forget to update the outbound access rules on the edge firewall to allow the new server to access the public time resource.
Choosing a Time Source
I used time.cloudflare.com as the primary time source for this customer, with time.nist.gov as a fallback. You can use any reliable public time service, such as time.windows.com or a regional pool.ntp.org address. Separate multiple servers with spaces in the NtpServer value.
Adding a Fallback Time Source
A single upstream time source works, but it makes the entire domain dependent on one provider. Microsoft recommends configuring three or more time servers when using multiple peers, or, with only two, marking one with the UseAsFallbackOnly flag (0x2). I chose the latter, setting NtpServer to time.cloudflare.com,0x8 time.nist.gov,0xa. The 0xa flag combines client mode (0x8) and fallback only (0x2), so W32Time uses NIST only when Cloudflare is unavailable. Keep the following in mind when choosing a fallback.
It removes a single point of failure. Cloudflare’s time service is highly reliable, but the service itself isn’t the only thing that can fail. A DNS resolution failure, a BGP route leak or hijack affecting the provider’s prefixes, an upstream ISP routing problem, or a firewall change can all make a single provider unreachable from your network. NIST runs on a completely separate network and doesn’t use anycast, so an event that affects one provider is unlikely to affect the other.
An outage isn’t catastrophic. Even if the PDC emulator can’t reach any upstream source, it keeps running on its own clock and continues serving time to the rest of the domain. Every domain controller and domain member still follows the PDC emulator, so the domain stays in sync with itself while slowly drifting from UTC. That’s what matters most for Kerberos, which compares the client’s clock with the domain controller’s clock, not with UTC. A typical system clock drifts by a few seconds per day at most, so an outage lasting hours or even days has no practical impact. When the time source becomes reachable again, W32Time corrects the accumulated offset automatically.
Both sources must handle leap seconds the same way. Cloudflare and NIST both insert leap seconds as a one-second step, so they’re a safe pair. Google, AWS, and Meta smear leap seconds instead, so don’t pair one of them with Cloudflare or NIST. The next section explains why.
A fallback doesn’t improve accuracy. A second source improves availability, not accuracy. With UseAsFallbackOnly, W32Time only consults NIST when Cloudflare is unreachable, so there’s nothing to cross-check against. Even with two active peers, there’s no majority to decide which one is right if they disagree. That’s fine for a typical Active Directory domain, which doesn’t require high-accuracy time.
Leap Second Considerations
Avoid mixing time services that handle leap seconds differently. A leap second is an occasional one-second adjustment to UTC that keeps it aligned with the Earth’s rotation. Most time services, including Cloudflare and NIST, apply it the standard way, by inserting the extra second all at once. Google (and AWS) instead “smear” it by slightly slowing their clocks over a 24-hour window, so during that period their time differs from other services by up to half a second. If a domain controller has both kinds of servers in its peer list, they disagree during a leap event, and the results are unpredictable. Pick one approach and use it consistently. You can read more about each approach in Google’s leap smear documentation and Cloudflare’s NTP documentation.
Network Time Security (NTS)
NTP has no built-in protection against tampering, so an attacker on the network path can spoof or alter a response from a public time server. Network Time Security (NTS), defined in RFC 8915, addresses this by adding cryptographic authentication to NTP’s client-server mode. The client first performs a TLS 1.3 key exchange with the server on TCP port 4460, then uses the resulting keys to authenticate standard NTP packets on UDP port 123. Cloudflare’s time service supports NTS. As of this writing, W32Time doesn’t support NTS, so there’s no way to enable it with w32tm.exe or Group Policy. In practice, the PDC emulator’s external sync is the only unauthenticated link in the hierarchy, because domain members and domain controllers already authenticate time within the domain using Microsoft’s NTP authentication extensions (MS-SNTP).
Allowing Outbound NTP
The PDC emulator must be able to reach both time services on UDP port 123. In the customer’s environment, as in my lab, outbound NTP was blocked at the edge firewall. I added a rule allowing outbound UDP 123 from the PDC emulator to the IPv4 and IPv6 addresses of both time services. Cloudflare publishes its addresses in its documentation, and NIST publishes the list of servers that time.nist.gov rotates across. Be sure to include both address families if your domain controllers have IPv6 connectivity, because W32Time will often prefer IPv6 when the name resolves to both. Also, remember to update the rule if the PDC emulator role moves to a different server. You can validate reachability to both services from the PDC emulator before configuring anything.
If both return offsets, you’re good to go. An error of 0x800705B4 indicates a timeout, which usually means UDP 123 is blocked or the IPv6 path isn’t working.
Creating the GPOs
The following script creates the WMI filter and all three GPOs. It links the two domain controller GPOs to the Domain Controllers OU and the member GPO to the domain root. It requires the GroupPolicy and ActiveDirectory modules (Install-WindowsFeature -Name GPMC, RSAT-AD-PowerShell on Windows Server) and Domain Admin rights. Run it in Windows PowerShell 5.1. You can also download the script from GitHub.
$MemberGpo =New-GPO -Name 'Domain Member Time Settings'-Comment 'Disable the Hyper-V time provider so domain members follow the domain hierarchy'-Server $Pdc
There are a few things worth noting about this script.
Everything targets the PDC emulator. The GroupPolicy cmdlets talk to the PDC emulator by default, but the ActiveDirectory cmdlets can pick any domain controller. Without -Server, Set-ADObject may land on a domain controller where the new GPO hasn’t replicated yet, and the script fails partway through. I hit this in the field, so the script now pins every call to the PDC emulator.
Only the required values are written. Enabling the Global Configuration Settings Administrative Template writes every value it contains, including some outdated clock discipline defaults. Setting individual registry values avoids that, and everything not set by policy keeps its default. The trade-off is that GPMC may show these under Extra Registry Settings instead of Windows Time Service. That’s cosmetic.
VMICTimeProvider is disabled with a preference, not a policy. There is no Administrative Template setting for it. The Group Policy Preference writes directly to the service key, so it persists even if the GPO stops applying, which is what you want for a domain controller.
The member GPO needs only the preference. Domain members already default to NT5DS, so VMICTimeProvider is the only thing keeping virtual machines off the domain hierarchy. Because it’s linked to the domain root, it also applies to domain controllers. That’s harmless, since DC Time Settings sets the same value and takes precedence.
The WMI filter is assigned directly. The GroupPolicy module has no cmdlet for creating or assigning WMI filters, so the script writes the gPCWQLFilter attribute itself.
Multi-domain forests.DomainRole = 5 matches the PDC emulator of any domain. Link DC Time Sync only in the forest root domain. Child domain PDC emulators should follow the domain hierarchy.
GPOs applied to domain controllers.
DC Time Sync GPO with WMI filtering applied to PDC emulator.
Applying the Policies
Force replication so every domain controller has the new GPOs, then apply them and restart the time service.
Domain members pick up the new GPO at their next policy refresh. However, W32Time reads which providers are enabled only when the service starts, so a member VM keeps using VMICTimeProvider until W32Time restarts or the machine reboots. To switch a member over immediately, run the following commands on it.
gpupdate.exe /target:computer /force
Restart-Service -Name W32Time
w32tm.exe /resync /rediscover
Configuring the Workgroup Hyper-V Hosts
With the domain controllers fixed, the last piece is the Hyper-V hosts. In the customer’s environment, most of the domain ran on hosts that were workgroup members, and none had any time configuration. The VMs no longer take their time from the host continuously, but the host’s clock still sets each VM’s time at startup and after a restore from a saved state. Workgroup machines don’t participate in the domain hierarchy, so Group Policy can’t help here. Each host must be configured locally, and there are two reasonable options.
Sync directly from the public time service. This is what I did for the customer. The hosts don’t depend on a VM they’re running, which avoids a chicken-and-egg problem at boot. It does require allowing outbound UDP 123 from each host.
Sync from the PDC emulator. This keeps a single internal source of truth and needs no additional edge firewall rules, since domain controllers answer NTP requests by default. The downside is that the host boots before the PDC emulator VM and runs on its own clock until the domain controller is available.
Either way, everything traces back to the same UTC source. Run the following commands locally on each Hyper-V host.
Setting SpecialPollInterval is important. The workgroup default is 604,800 seconds, or one week, which is far too infrequent to keep a virtualization host accurate. The 0xb flag on time.nist.gov adds fallback only (0x2) to the same flags, so the hosts follow the same primary and fallback design as the PDC emulator. To sync from the PDC emulator instead, replace the peer list with the PDC emulator’s name or IP address, and optionally add another domain controller with the 0xb flag as a fallback. Use IP addresses if the hosts don’t use the domain’s DNS servers.
Domain Member Virtual Machines
VMICTimeProvider is enabled by default on every Hyper-V VM, not just domain controllers, so domain-joined member VMs take their time from the host instead of the domain hierarchy. With accurate hosts, that works, but it creates a second time root. Domain controllers follow the PDC emulator, while member VMs follow whichever host they run on. In my lab, a member VM was about 77 milliseconds off the PDC emulator, even though both its host and the PDC emulator synced with Cloudflare. If a host loses access to its time source, its VMs drift away from the domain controllers, which is the original problem in a new place. The Domain Member Time Settings GPO prevents this. It disables only the W32Time provider, not the Hyper-V time synchronization integration service, so VMs still get their clock set at startup and after a restore from a saved state.
Validating the Configuration
Once everything is in place, confirm each tier of the hierarchy is getting time from the right place, including the domain controllers, domain members, the Hyper-V hosts, and the domain as a whole.
Validating Domain Controllers
Run the following commands to check the time configuration and status of every domain controller.
Validating domain controller time configuration settings.
The .Line.Trim() is there for a reason. Select-String results returned through Invoke-Command are deserialized objects that PowerShell can’t format, so without it you’ll see blank lines instead of the output. The following table shows what to look for on each type of server.
Server
Type
AnnounceFlags
Source
Stratum
VMICTimeProvider
PDC emulator
NTP (Policy)
5 (Policy)
time.cloudflare.com,0x8
4
0
Other domain controllers
NT5DS (Policy)
10 (Policy)
PDC emulator
5
0
Hyper-V hosts
NTP (Local)
n/a
time.cloudflare.com,0x9
4
n/a
The (Policy) label confirms Group Policy is in control rather than local settings. Root Dispersion will be high immediately after the service restarts and should settle under a second within about 30 minutes. NtpServer lists both time services, but the source should show time.cloudflare.com. If it shows time.nist.gov, the PDC emulator can’t reach Cloudflare and has switched to the fallback.
Validating Domain Members
On a domain member VM, run the following commands to confirm it follows the domain hierarchy and agrees with the PDC emulator.
Domain member VM synchronizing with the PDC emulator.
The source should be a domain controller, not VM IC Time Synchronization Provider, and the stratum should be one or two levels below the PDC emulator. In my lab, a member VM went from about 77 milliseconds off the PDC emulator to under 10 milliseconds within minutes of switching to the domain hierarchy.
Validating Hyper-V Hosts
On the Hyper-V hosts, run the following commands locally.
Time synchronization settings on the Hyper-V host server.
Both time services are listed as peers. The State for time.cloudflare.com should be Active. A state of Pending that persists usually means the host can’t reach that time server. However, Pending is also normal for up to one polling interval after the service restarts, which is about 17 minutes with a SpecialPollInterval of 1024 seconds, because W32Time rebuilds its peer list and resets the peer statistics. To tell the difference, run w32tm.exe /query /peers /verbose and check LastSyncError. A value of 0x00000000 (Succeeded) means the last sync worked, and the peer will return to Active at its next poll.
Validating the Domain
After things have had time to settle, check the entire domain at once. Every domain controller should show a small offset relative to the PDC emulator, with no errors.
w32tm.exe /monitor /domain:$DomainFqdn
All domain controllers synchronizing with the PDC emulator.
You might notice an unusual IPv4 address listed for dc1, such as 36.113.118.130. That’s not dc1’s address, and it’s not a real IPv4 address at all. It’s the RefID, which identifies the server’s upstream time source. The NTP reference ID field is only 32 bits, so when the source is reached over IPv6, as time.cloudflare.com is here, the field contains the first 32 bits of the MD5 hash of the source’s IPv6 address, as defined in RFC 5905. It’s expected behavior and can safely be ignored. In my lab, the PDC emulator went from roughly 840 milliseconds off UTC to closely tracking UTC once it began syncing with Cloudflare. In the customer’s environment, the Kerberos anomalies stopped once all domain controllers and hosts converged on a single source.
Summary
Time synchronization is easy to overlook, especially in virtualized environments where Hyper-V quietly fills in the gaps. In this case, the symptoms showed up as Kerberos anomalies during an AD CS engagement, but the root cause was a domain with no single, authoritative time source. The fix came down to the following steps.
Reset every domain controller to the default W32Time configuration.
Configure the PDC emulator, and only the PDC emulator, to sync with a reliable public time service, plus a second as a fallback, using a WMI-filtered GPO.
Configure all other domain controllers to follow the domain hierarchy and disable VMICTimeProvider on every domain controller with a second GPO.
Disable VMICTimeProvider on domain members with a third GPO linked to the domain root, so virtual machines follow the domain hierarchy too.
Allow outbound UDP 123 for the systems that sync externally.
Explicitly configure any workgroup Hyper-V hosts, since they don’t participate in the domain hierarchy.
With Group Policy managing the domain controllers and domain members, the configuration is consistent, self-documenting, and follows the PDC emulator role automatically if it ever moves.
Microsoft released the November 2026 security updates today, which include three vulnerabilities affecting Always On VPN deployments. This month’s release addresses issues in the Secure Socket Tunneling Protocol (SSTP) and Internet Key Exchange (IKE). And for a change, there are NO vulnerabilities in the Windows Server Routing and Remote Access Service (RRAS) this month!
SSTP Vulnerabilities
SSTP is commonly used for Always On VPN user tunnel connections. Because SSTP is, by design, exposed directly to the Internet, vulnerabilities affecting this protocol deserve attention. This month’s updates address the following two SSTP vulnerabilities. Both are rated Important.
The November 2026 security updates also address a spoofing vulnerability in the Windows IKE Extension. Always On VPN implementations that use the device tunnel or IKEv2 for the user tunnel are affected. Microsoft rates this vulnerability as Important.
RRAS has been a regular fixture in the monthly security updates, with several CVEs disclosed in most recent releases. September 2026 alone included eight RRAS CVEs, four of them rated Critical. It is refreshing to report that the November 2026 release includes no RRAS vulnerabilities at all.
Summary
This is a relatively light month for Always On VPN administrators. All three vulnerabilities are rated Important, and none are rated Critical. However, SSTP and IKE are both Internet-facing services in most Always On VPN deployments, so administrators should plan to deploy these updates during their next scheduled maintenance window and avoid unnecessary delays.
This release introduces new capabilities for monitoring connector performance and resolving names in complex network environments, including the following.
Performance and Diagnostics
The Connector Diagnostics tool, available from the system tray, now includes a new Performance tab. Here, administrators can view up to 24 hours of resource history for the connector server, collected in one-minute aggregates. The Performance tab displays average and peak values for the following metrics.
Machine CPU: Total CPU usage across the machine.
Connector CPU: Share of total machine CPU used by the connector.
Connector resident memory: Physical memory used by the connector process.
Machine available memory: Physical memory still available to applications.
Administrators can use the Window drop-down list to display performance history for the last 1 hour, 6 hours, or 24 hours. This gives better visibility into resource consumption over time, which is helpful when sizing connector servers or investigating performance issues. In addition, this update improves the accuracy of connector health reporting.
DNS Resolution
The connector now honors DNS suffixes and DNS servers configured on individual network interfaces in Windows. This update also improves the fallback behavior for DNS SRV record queries.
Improvements
In addition to new features, v1.5.5130.0 includes several improvements to logging, reliability, and security.
Logging and Observability
This update includes the following changes to connector logging.
Trace file rotation is now supported.
The default capacity for the Session event log has been increased to 3 GB.
Error messages for connectivity and backend failures have been improved to streamline troubleshooting.
Note: With the larger default Session event log size, administrators should ensure the connector server has sufficient free disk space on the system drive.
Reliability and Security
This update also includes the following reliability and security enhancements.
TCP keepalive has been added to reduce idle connection resets.
Memory management during request processing has been improved.
Security for local log files and other connector files has been enhanced.
Updating to v1.5.5130.0
Existing Entra Private Network Connector installations will not automatically receive this update. Administrators must manually download the connector from the Microsoft Entra admin center and apply the update themselves to take advantage of these new features and capabilities.
Windows CLAT (WinCLAT) is generally available on Windows 11 25H2, starting with build 26200.9550. WinCLAT is the Windows client-side translator for 464XLAT (RFC 6877). It translates IPv4 traffic from applications into IPv6 for delivery to a NAT64 gateway, allowing IPv4-only applications to continue working on IPv6-only and IPv6-mostly networks. Successful operation depends on both the Windows client configuration and the supporting network infrastructure. This post explains how to use the WinCLAT PowerShell module to verify these requirements, diagnose common problems, and test IPv4 connectivity through the translation path.
Why Use the WinCLAT PowerShell Module
WinCLAT is configured and inspected using the netsh.exe interface clat command context. However, its output requires careful interpretation when troubleshooting. A configuration command can complete without error even when Group Policy prevents the requested setting from taking effect. An instance can report that it is translating while IPv4 traffic fails, and disabling a global setting does not necessarily stop a manually enabled instance. The WinCLAT PowerShell module simplifies these tasks by checking the effective configuration after changes and providing health checks with explanations and recommended corrective actions. It supports troubleshooting on individual computers and across multiple remote computers.
How WinCLAT Activates
Understanding when WinCLAT activates automatically helps explain many troubleshooting scenarios. With AutoEnable enabled, Windows automatically activates WinCLAT on eligible non-cellular interfaces when the following conditions are met.
WinCLAT is permitted. The Permit setting is enabled. Today, it is disabled by default in Windows.
The interface has an IPv6 address assigned using Stateless Address Autoconfiguration (SLAAC) and an IPv6 default route.
The interface has no native IPv4 connectivity. On an IPv6-mostly network, DHCPv4 option 108, called IPv6-Only Preferred (RFC 8925), tells a compatible client to operate without a native IPv4 address for the period specified by the DHCPv4 server. WinCLAT provides IPv4 application connectivity over IPv6 during that time.
A NAT64 prefix has been discovered, either from the PREF64 option in router advertisements (RFC 8781) or by querying ipv4only.arpa for AAAA records through a DNS64 server (RFC 7050). DNS64 is required for the DNS-based discovery method but is not required when WinCLAT discovers the prefix through PREF64.
NAT64 Gateway Requirements
Successful IPv4 connectivity through WinCLAT also requires a reachable NAT64 gateway configured to translate traffic using the discovered prefix. Discovering a prefix and activating WinCLAT do not confirm that the gateway is reachable or that traffic can pass through it.
Automatic and Manual Activation
AutoEnable is enabled by default and allows Windows to activate WinCLAT automatically when an interface meets the required conditions. Manually enabled instances behave differently, as described later in this post. WinCLAT can be enabled manually on a specific interface after automatic activation is disabled. When WinCLAT is translating, Windows assigns the interface an IPv4 address from the 192.0.0.0/29 IPv4 Service Continuity Prefix (RFC 7335) and adds an IPv4 default route through WinCLAT.
Installing the Module
The WinCLAT module is available in the PowerShell Gallery and runs on Windows PowerShell 5.1 and PowerShell 7. Run the following command to install the module.
Install-Module -Name WinCLAT -Scope CurrentUser
The module is needed only on the computer running the commands. Remote computers require WinRM, and commands that read interface state or change configuration require an elevated session on the target.
Step 1: Run Test-WinCLAT
Test-WinClat is the starting point for any WinCLAT problem. Run it from an elevated session so the interface checks can run.
Test-WinClat
The summary shows the overall result (Pass, Warning, Fail, or NotApplicable), whether any interface is translating, and the checks that returned a warning or failure. Individual checks can also return Info for conditions that do not affect the overall result. To display every check and its explanation, use -Detailed with Format-List.
The following is a list of checks that Test-WinClat performs.
Test
What it verifies
Feature present
The clat netsh.exe context exists on the computer
CLAT permitted
Permit is enabled in the active (effective) configuration
Prefix discovery valid
At least one of Pref64FromRA and Pref64FromDns is enabled
Policy override
Group Policy is not overriding the local configuration
SLAAC address
The interface has an IPv6 address from SLAAC
IPv6 default route
The interface has an IPv6 default route
Native IPv4
The interface has no native IPv4 address
Instance active
WinCLAT is translating when its prerequisites are met
CLAT address
The WinCLAT IPv6 address is assigned to the interface and on its current prefix
Prefix consistency
The NAT64 prefix matches the prefix returned by DNS64, when DNS64 is available
Mode sanity
WinCLAT can activate: AutoEnable is enabled, or an instance has been enabled manually
Functional test
IPv4 traffic passes through WinCLAT (optional)
Global checks do not require elevation. Interface checks are skipped, rather than failed, when the session is not elevated. Results of Info are informational and do not affect the overall result.
Step 2: Inspect the Configuration
Get-WinClatConfiguration returns the global settings. Use -Store Both to compare the active (effective) configuration with the persistent (local) configuration.
Get-WinClatConfiguration -Store Both
Compare the active configuration with the persistent configuration to identify differences between the effective settings and the locally stored settings. Use the PolicyControlled property to identify settings controlled by Group Policy. This property also identifies policy-controlled settings whose effective values match the local values, which a comparison of the two stores alone would not reveal.
Step 3: Inspect the Instances
Get-WinClatInstance returns the WinCLAT state of each IPv6-enabled interface. It requires elevation.
Get-WinClatInstance
Two properties are particularly useful when troubleshooting:
Mode shows whether the instance was enabled Automatically by Windows or Manually by an administrator.
TriggerSource shows why the instance was enabled: Pref64 RA (the network advertises PREF64), No IPv4 (the interface has no IPv4 connectivity), or Manual. It is read from event 1106 in the Microsoft-Windows-IPxlatCfg/Operational event log.
Common Problems
The following are common problems associated with WinCLAT configuration and operation.
Feature Not Present
Get-WinClatConfiguration returns Status FeatureNotAvailable, and Test-WinClatfails the Feature present check. WinCLAT is generally available on Windows 11 25H2 build 26200.9550 and later. The OSBuild property shows each computer’s build number, making it easy to identify computers that need the latest cumulative update.
WinCLAT is not available on Windows Server. Servers return StatusNotSupported, and Test-WinClat reports an overall result of NotApplicable.
WinCLAT Not Permitted
Permit is disabled by default, so WinCLAT does not activate automatically on Wi-Fi or Ethernet interfaces until Permit is enabled, either locally or through Group Policy. Test-WinClat fails the CLAT permitted check only when an interface is IPv6-only and could use WinCLAT. On a dual-stack network, the check is informational because WinCLAT would not be used there anyway.
With AutoEnable enabled, WinCLAT activates on eligible interfaces as soon as Permit is enabled.
DHCPv4 Option 108
Permit also affects DHCPv4 option 108. Windows honors option 108 only while WinCLAT is permitted. With Permit disabled, a client on an IPv6-mostly network accepts a DHCPv4 lease and uses native IPv4, so WinCLAT is not needed, and the CLAT permitted check is informational.
WinCLAT Not Active on Dual-Stack Network
This is expected. WinCLAT does not activate on an interface with native IPv4. Test-WinClatreports Native IPv4 and Instance active as Info on dual-stack interfaces. If a dual-stack interface has no SLAAC address or no IPv6 default route, as on a network that assigns IPv6 addresses with DHCPv6 only, those checks are also Info rather than Fail, because they matter only if the network becomes IPv6-only.
SLAAC Addressing Not Present
WinCLAT requires an IPv6 address configured using SLAAC. An interface whose IPv6 addresses are assigned only through DHCPv6 does not meet this requirement. DHCPv6 can still provide other configuration information, such as DNS server addresses and a domain search list. Test-WinClat checks for a SLAAC address and reports when an interface that needs WinCLAT does not have one.
Group Policy Overrides Local Configuration
Netsh.exe reports success when a local change is made to a setting that Group Policy controls, but the effective value does not change. Set-WinClatConfiguration reads the configuration back after every change and reports the result with StatusPolicyOverride when the policy keeps a different value.
In addition, Test-WinClat indicates when local settings conflict with Group Policy enforced settings.
Group Policy can control Permit, Pref64FromRA, and Pref64FromDns. There is no policy for AutoEnable. The policy values are stored in the following registry location.
An instance that is enabled but has no NAT64 prefix cannot translate. Test-WinClat fails the Instance active check and names the prefix discovery methods that are enabled. Common causes include:
The network does not include the PREF64 option in router advertisements, and Pref64FromDns is disabled.
No usable NAT64 prefix is available through router advertisements, and Pref64FromDns is enabled, but the DNS servers assigned to the client do not provide DNS64.
Both Pref64FromRA and Pref64FromDns are disabled. Netsh.exe accepts this combination silently, but WinCLAT can never activate. Set-WinClatConfiguration refuses it.
When WinCLAT discovers a NAT64 prefix through the PREF64 option in router advertisements, DNS64 is not required for prefix discovery or for translating IPv4 application traffic. A reachable NAT64 gateway using that prefix is still required. If DNS64 is unavailable, the Prefix consistency check is informational because there is no DNS64-derived prefix to compare.
Delayed WinCLAT Activation
WinCLAT activates fastest when the network advertises the NAT64 prefix through PREF64. When DNS64 is the only available prefix discovery method, Windows first waits to determine that the interface has no native IPv4 connectivity, so activation takes several seconds longer. Allow time for this process before treating an inactive instance as a configuration problem.
Manually Enabled Instances Continue Translating
Disabling Permit or AutoEnable stops translation on instances that Windows enabled automatically. Manually enabled instances can continue translating after either setting is disabled. When troubleshooting continued translation, check the instance’s Mode property to determine whether it was enabled manually.
Use Get-WinClatInstance to identify manually enabled instances.
Note that netsh.exe refuses to change an instance while AutoEnable is enabled. To return an interface from manual to automatic control, disable AutoEnable, disable the instance, and enable AutoEnable again:
Manual instance state is runtime only. It survives an adapter restart and link loss, but it is lost on reboot. Enabling an instance manually requires disabling AutoEnable, and AutoEnable remains disabled after the reboot, so WinCLAT does not activate at all. Enable AutoEnable again to restore automatic operation:
Set-WinClatConfiguration -AutoEnable Enabled
The Mode sanity check in Test-WinClat reports this condition.
IPv4 Fails After Moving to a Different Network
When a translating client moves to a different IPv6 network without restarting its network adapter, WinCLAT keeps its IPv6 address on the previous network’s prefix. The instance still reports that it is translating, but IPv4 traffic through WinCLAT fails. Microsoft has acknowledged this known issue and is working to resolve it in a future release.
Test-WinClat detects this condition. The CLAT address check fails, naming the address in use and the current prefix, while the Instance active check passes.
Restarting the network adapter resolves the issue.
Restart-NetAdapter -Name 'Ethernet'
The IPv6 address reported by netsh.exe interface clat show instance cannot be used to detect this condition, because it may report a new address that is not actually assigned to the interface. The CLAT address check compares the addresses actually assigned to the adapter with its current prefix.
Netsh.exe Reports Addresses That Are Not Assigned
An instance that is enabled but no longer translating can retain stale information in netsh.exe output. For example, a manually enabled instance on an interface that now has native IPv4 connectivity might still report a WinCLAT IPv6 address and 192.0.0.1 even though those addresses are no longer assigned to the interface. It might also display a NAT64 prefix with a remaining lifetime of zero. Use Get-NetIPAddress to confirm the addresses assigned to the interface. Clear the manual instance using the three-command sequence shown earlier or restart the computer.
Testing the Translation Path
The checks above assess WinCLAT configuration and local instance state. The functional test verifies connectivity to a specific IPv4 destination through WinCLAT and the NAT64 gateway. Use Test-WinClat with an IPv4 target address that is reachable through the gateway and known to respond to the selected test.
Keep the following in mind when interpreting the result.
Use an IPv4 address as the target. A hostname can resolve to a synthesized AAAA record through DNS64, allowing the connection to use IPv6 through NAT64 without using WinCLAT. Testing with an IPv4 address ensures the test uses IPv4. Check the selected interface and source address to confirm that the traffic passes through WinCLAT.
Native IPv4 can bypass WinCLAT. If another interface provides native IPv4 connectivity to the test destination, Windows might send the test traffic through that interface. The module reports Info when the selected path bypasses WinCLAT, even if the destination responds successfully. Review the Detail property to identify the selected interface and source address and confirm whether the test used WinCLAT.
Unreachable destinations time out. ICMP destination unreachable messages that NAT64 returns for IPv4 destinations are not delivered to the IPv4 application, so a test to an unreachable or filtered address returns a Warning after timing out rather than an immediate failure. Choose a target that is known to respond, ideally on your own infrastructure.
One test covers one path. When several interfaces translate, the test proves that IPv4 works through the interface Windows chose, not on each interface.
Troubleshooting at Scale
The WinCLAT commands accept computer names from the pipeline, including input from Get-Content and Get-ADComputer, and process remote computers in parallel over WinRM. Before connecting, the module checks TCP port 5985. If that connection fails, it reports the computer as Unreachable without waiting for a full WinRM timeout. This status indicates that the module could not reach the required endpoint. The computer might be offline, the port might be blocked, or WinRM might be configured to use a different TCP port.
Filtering and Exporting Results
The module returns a result for every target computer, including those that cannot be reached, do not support the feature, or cannot be fully checked because the session lacks elevation. The Status property identifies the outcome, and the Message property explains it.
# Test every computer in an OU and show only the computers with problems
The output is flat, so it exports cleanly with Export-Csv for reporting and comparison over time.
Known Issues
The following Windows behaviors can affect WinCLAT operation and troubleshooting. The module can identify some of these conditions, but it does not correct the underlying Windows behavior. Available workarounds are listed below.
Issue
Effect
Workaround
WinCLAT keeps its IPv6 address on the previous prefix after a network change
IPv4 traffic through WinCLAT fails; Test-WinClat reports CLAT address Fail
Restart the network adapter
WinCLAT IPv4 address is dynamically registered in DNS
Connections to the client may fail when DNS resolves its name to a WinCLAT IPv4 address
None
Translated ICMP errors are not delivered to IPv4 applications
Unreachable IPv4 destinations time out instead of failing immediately
None
Summary
Troubleshooting WinCLAT starts with Test-WinClat, which checks every prerequisite, explains each failure, and suggests remediation. Get-WinClatConfiguration reveals Group Policy overrides, and Get-WinClatInstance shows whether each instance was enabled automatically or manually. Most problems come down to a few causes: Permit disabled by default, Group Policy overriding local settings, no NAT64 prefix discovered, a manual instance that does not follow the global settings, or a stale WinCLAT address after a network change. Because netsh.exe reports success even when a change does not take effect, always verify the result by reading the state back, which the WinCLAT module does automatically.