Microsoft Autoenrollment is configured on profiles attached to your Application. Product Admins attach profiles, and Application Admins configure enrollment methods on those profiles.
Prerequisites
In Infisical
- The Enterprise plan
- A profile attached to your Application that issues from an active internal certificate authority (external certificate authorities aren’t supported)
- A CA key that matches the profile’s default key algorithm: an RSA CA for RSA keys or no default, an EC CA for ECDSA keys
- A certificate policy that allows the profile’s default key algorithm (RSA 2048 if the profile has none) and its default signature algorithm (SHA-256 for the key type if the profile has none)
- If the profile’s certificate policy restricts custom extensions, rules that allow the AD SID security extension (
1.3.6.1.4.1.311.25.2) and Certificate template information (1.3.6.1.4.1.311.21.7, with*as its allowed value) - An LDAP connection that uses the Active Directory provider, for your computers’ domain. Use an LDAPS URL (
ldaps://, usually port 636) with certificate verification on. Each certificate is named after the DNS host name Active Directory returns, so over plain LDAP, or LDAPS without verification, anyone on the network path to your domain controllers could change that name. LDAPS is also required if your domain controllers require LDAP signing. - The
Connectaction onApp Connectionsfor that LDAP connection
In Active Directory
- Read access to
userAccountControlandtokenGroupson computer objects for the LDAP connection’s account - A dedicated domain user account to map the Kerberos service principal to (
ktpassresets its password, so don’t use an account anything else signs in with) - Permission to run
ktpasson a domain controller
On your network
- Windows computers that reach your Infisical instance over HTTPS
- A TLS certificate on that address that the computers trust
- If you self-host Infisical,
SITE_URLset to the HTTPS address computers use (the enrollment URLs and the Kerberos service principal are built from it) - No proxy that inspects HTTPS between the computers and Infisical
- Your instance sees the same TLS certificate at its host name that the computers see (to check, see Network requirements for TLS channel binding)
/cep/ and /ces/ to Infisical as well as /api/.
Step 1: Create a keytab
Windows computers sign in with Kerberos, so the profile needs a keytab, a file that holds the Kerberos key for your instance’s service principal. If another profile in this Application already has a keytab for your instance’s host name, the panel you open below offers that profile’s keytab. Select Use This Keytab to copy that profile’s keytab and LDAP connection, and skip the rest of this step.1
In your Application, go to the Settings tab. On the profile, select Configure, or one of its enrollment method badges if it already has a method.
2
Select Add enrollment method, then select Microsoft Autoenrollment.
3
Under Kerberos Keytab, copy the
ktpass command. Replace <REALM> with your Kerberos realm, which is your domain name in upper case (such as CORP.EXAMPLE.COM), and replace <DOMAIN>\<service-account> with the dedicated account’s NetBIOS domain and user name (such as CORP\svc-infisical).4
On a domain controller, turn on AES for the account from an elevated PowerShell prompt. The keytab only holds an AES key, so if the account doesn’t support AES, the domain controller can encrypt tickets with RC4 and the keytab can’t read them.
5
Run the
ktpass command on the domain controller and enter the account’s password when ktpass asks for it. ktpass also sets the account’s user principal name and prints the key, so don’t share its output.6
Upload the
infisical.keytab file that the command creates.Step 2: Configure the enrollment method
Fill in the rest of the panel, then select Enable:- LDAP connection: the Active Directory connection used to look up each computer’s DNS name
- AD groups (optional): the Active Directory security groups whose computers can enroll (leave it empty to let every computer in the domain enroll)
- Skip the channel binding check: accept a request bound to any TLS certificate (off by default)
- Renew before (days): the number of days before expiry that Windows renews a certificate (defaults to 42)
Step 3: Add the URL to Group Policy
Add the profile’s URL to a Group Policy Object (GPO) that applies to the computers you want to enroll, and turn on autoenrollment in the same GPO. You can do this in Group Policy Management or with a PowerShell script.- Group Policy Management
- PowerShell
1
On a domain controller, open Group Policy Management (
To use a new GPO, right-click the OU that holds your computers (or the domain, to cover every computer) and select Create a GPO in this domain, and Link it here. Name the GPO, expand the OU, then right-click the new GPO and select Edit. Windows links a new GPO last, so if another GPO already sets enrollment policy servers, select the OU, open Linked Group Policy Objects, select the new GPO and select Move link to top.
gpmc.msc). Right-click the GPO that’s linked to the organizational unit (OU) with your computers, and select Edit.
To use a new GPO, right-click the OU that holds your computers (or the domain, to cover every computer) and select Create a GPO in this domain, and Link it here. Name the GPO, expand the OU, then right-click the new GPO and select Edit. Windows links a new GPO last, so if another GPO already sets enrollment policy servers, select the OU, open Linked Group Policy Objects, select the new GPO and select Move link to top.
2
In the editor, go to Computer Configuration > Policies > Windows Settings > Security Settings > Public Key Policies.

3
Double-click Certificate Services Client - Certificate Enrollment Policy. Set Configuration Model to Enabled, leave the Active Directory Enrollment Policy entry as it is, then select Add.

4
Paste the Enrollment policy URL into Enter enrollment policy server URI, set Authentication type to Windows integrated, and select Validate Server.
Validate Server signs in with the account of the computer you’re running Group Policy Management on and should report that the URL was validated. If that computer isn’t in an allowed group, the audit log also records a refusal for it, which you can ignore. If validation fails, check the URL and that the method is on for the profile, then see Troubleshooting.
Select Add, then select OK in the policy dialog.
Validate Server signs in with the account of the computer you’re running Group Policy Management on and should report that the URL was validated. If that computer isn’t in an allowed group, the audit log also records a refusal for it, which you can ignore. If validation fails, check the URL and that the method is on for the profile, then see Troubleshooting.
Select Add, then select OK in the policy dialog.5
Double-click Certificate Services Client - Auto-Enrollment. Set Configuration Model to Enabled, select Renew expired certificates, update pending certificates, and remove revoked certificates and Update certificates that use certificate templates, then select OK.

Step 4: Trust your CA’s root certificate
Computers need to trust your CA’s root certificate to use the certificates they get. Autoenrollment still installs a certificate whose root isn’t trusted, but the certificate’s chain fails validation. Add the root to the same GPO:1
In Infisical, go to Certificate Authorities, open the menu on the CA, and select View Certificate. In the CA Certificate dialog, select the download icon next to Certificate Body. If the profile issues from an intermediate CA, download the root CA’s certificate instead.
2
In the GPO editor, go to Public Key Policies, right-click Trusted Root Certification Authorities, and select Import. Follow the wizard to import the certificate you downloaded. The file downloads as
cert.pem, which the wizard doesn’t list by default, so rename it to root.cer first or set the wizard’s file type to All Files.Step 5: Enroll computers
Computers enroll the next time they apply Group Policy. To enroll a computer right away, run the following commands on it from an elevated prompt:certlm.msc on it and go to Personal > Certificates, where the new certificate is listed. The certificate also appears in your Application’s Certificate Inventory tab.
Windows keeps the enrollment policy for up to 8 hours, so a change to the enrollment method can take that long to reach a computer.
Certificate contents
Each certificate is built from the profile like any other, with these differences:- Names: the common name and DNS name are the computer’s
dNSHostNamein Active Directory, whatever the computer puts in its request - Security identifier: the computer’s SID in the Active Directory security extension (OID
1.3.6.1.4.1.311.25.2), which domain controllers use for strong certificate mapping - Validity: if the profile has no default TTL, one year (the same as the AD CS computer templates) or the policy’s maximum validity, whichever is shorter
- Key and signature: Windows generates its key with the profile’s default key algorithm and signs its request with the hash of the profile’s default signature algorithm, or RSA 2048 and SHA-256 if the profile has none
Re-enroll computers
Changing the enrollment method doesn’t replace the certificates computers already hold. They get the new settings when they renew. To make every computer that can still enroll request a new certificate the next time it fetches the enrollment policy (the same as re-enrolling all certificate holders of a template in AD CS), go to the Renewal section of the panel, select Re-enroll All Computers, then select Re-enroll. Computers pick up the change within 8 hours. If an approval policy covers the profile, each new request waits for approval. The certificates they replace stay valid until they expire.Approvals
If an approval policy covers the profile, the computer’s request waits for approval. Windows checks the request again on each autoenrollment run, installs the certificate after the request is approved, and drops the request if it’s rejected. Windows only checks requests made through an enrollment policy URL that’s in Group Policy. When a request is approved, the computer is checked in Active Directory again, and the certificate isn’t issued if the computer no longer qualifies: the method was turned off, the computer was deleted, disabled, removed from the allowed groups or had its DNS host name changed, or the certificate it renews was deleted or revoked. To install an approved certificate without waiting, runcertutil -pulse on the computer from an elevated prompt.
Turn off Microsoft Autoenrollment
To stop a profile from issuing certificates to computers, turn the method off and remove the profile’s URL from Group Policy:1
In your Application, go to the Settings tab and select the Microsoft Autoenrollment badge on the profile. Select Disable, then select Disable Enrollment.
2
In the GPO editor, double-click Certificate Services Client - Certificate Enrollment Policy, select the profile’s enrollment policy URL, select Remove, confirm, then select OK. Until you remove the URL, computers keep asking the profile for certificates.
- Keeps the certificates computers already hold
- Stops computers from collecting approved requests they haven’t picked up yet (those certificates were already issued and stay in Certificate Inventory, so revoke them if you need to)
- Deletes all of the method’s settings, including the keytab, so turning it back on needs a keytab again
Network requirements for TLS channel binding
Your instance checks each request’s TLS channel binding against the certificate it serves atSITE_URL. If you self-host Infisical, your network has to let it read that certificate from itself. It reads it at the first enrollment request, then again every hour while requests come in:
- It resolves
SITE_URL’s host name with the system DNS of the backend’s container or pod, and sends the name to no other resolver - It opens a TLS connection to each address it gets, on
SITE_URL’s port, directly, withoutHTTP_PROXYorHTTPS_PROXY
<host> and <port> from SITE_URL (443 when it has no port):
Troubleshooting
A computer added to an allowed group still can't enroll
A computer added to an allowed group still can't enroll
A computer’s group memberships come from its Kerberos ticket, so a group change only takes effect when the computer gets a new ticket, after a restart or when its ticket expires. To get a new ticket right away, run
klist -li 0x3e7 purge on the computer from an elevated prompt, then run autoenrollment again.The panel says the keytab is for another host name
The panel says the keytab is for another host name
Computers ask for a ticket for your instance’s host name, but the keytab was made for another host name. Select Replace under Kerberos Keytab, then select Use This Keytab if another profile in this Application has a keytab for this host name. Otherwise, run the
ktpass command that the panel shows and upload the new keytab.Requests are refused with a channel binding mismatch
Requests are refused with a channel binding mismatch
The audit log shows the reason
channel-binding-mismatch when a request is bound to a TLS certificate that your instance can’t see at its host name. This usually means computers reach your instance through a proxy that inspects HTTPS, or resolve its host name to an internal address that your instance’s own DNS lookups don’t return. Exclude your instance’s host name from HTTPS inspection, and make sure your instance resolves its host name the same way computers do. If neither applies, someone may be relaying the computers’ Kerberos tickets through another HTTPS site. To compare the two certificates, see Network requirements for TLS channel binding.Requests are refused because the channel binding can't be checked
Requests are refused because the channel binding can't be checked
The audit log shows the reason
channel-binding-unverifiable when your instance can’t check which TLS certificate a request is bound to. The panel shows the same reason. The message says which of these applies:- Your instance runs in FIPS mode
SITE_URLisn’t an HTTPS address- Your instance can’t read the certificate it serves at its host name, and read none in the last day (until then, requests are checked against the certificates it read last)
A computer doesn't get a certificate
A computer doesn't get a certificate
Windows records an error in the computer’s Application event log under the source
CertificateServicesClient-CertEnroll, but the error never says why the request was refused. Find the reason in the audit logs, where each refusal is one of these events:- Microsoft Autoenrollment Request Refused (
microsoft-autoenrollment-request-refused): a refused sign-in, a computer outside the allowed groups, an Active Directory problem, a refused renewal, a profile whose default TTL exceeds its certificate policy’s maximum validity, or a TLS channel binding that’s missing, bound to another TLS certificate, or can’t be checked (Windows leaves out the channel binding if the computer setsSuppressExtendedProtectionto1underHKLM\SYSTEM\CurrentControlSet\Control\Lsa) - Certificate Issuance Failed (
certificate-issuance-failed): a request that the certificate policy or CA rejects, such as one with a TTL or key the policy doesn’t allow, or a computer SID that the policy’s rule for the SID extension doesn’t allow
Event 82 always says the request failed in authentication, whatever the cause, so check the audit logs.If the error points to Kerberos, check that the computer can get a ticket for the service principal by running
klist -li 0x3e7 get HTTP/<host> from an elevated prompt on the computer. Without -li 0x3e7, klist gets a ticket for your own account instead of the computer’s.What’s next?
Approvals
Require approval before computers get certificates.
Issue and manage certificates
View and manage certificates in your Application.
Alerts
Get notified when certificates are about to expire.
Audit logs
Review enrollment requests and the reasons they were refused.