Azure Entra ID Integration with Kleidia#
This guide covers integrating Kleidia-managed YubiKeys with Microsoft Azure Entra ID (formerly Azure Active Directory) for passwordless authentication.
Overview#
Kleidia enables organizations to manage YubiKey FIDO2 credentials alongside PIV certificates. When combined with Azure Entra ID, users can leverage their YubiKeys for:
- Passwordless sign-in to Microsoft 365, Azure Portal, and Entra ID-connected applications
- Multi-factor authentication (MFA) as a phishing-resistant second factor
- Conditional Access policies requiring hardware security keys
Architecture#
┌─────────────────────────────────────────────────────────────────────────┐
│ User Workstation │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────────┐ │
│ │ Browser │────▶│ Kleidia │────▶│ Local Agent │ │
│ │ │ │ Frontend │ │ (ykman fido commands) │ │
│ └──────────────┘ └──────────────┘ └───────────┬──────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ YubiKey │ │
│ │ ┌─────────────┐ │ │
│ │ │ PIV Applet │ │ │
│ │ ├─────────────┤ │ │
│ │ │ FIDO2 Applet│◀────┐ │
│ │ └─────────────┘ │ │ │
│ └─────────────────┘ │ │
└────────────────────────────────────────────────────────────────────┼────┘
│
WebAuthn Challenge
│
┌────────────────────────────────────────────────────────────────────┼────┐
│ Azure Entra ID │ │
│ ┌───────────────────────────────────────────────────────────────┐ │ │
│ │ Authentication Service │ │ │
│ │ ┌─────────────────┐ ┌─────────────────┐ ┌──────────────┐ │◀┘ │
│ │ │ FIDO2 Registry │ │ Conditional │ │ User Sign-In │ │ │
│ │ │ (Passkeys) │ │ Access Policies │ │ Methods │ │ │
│ │ └─────────────────┘ └─────────────────┘ └──────────────┘ │ │
│ └───────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘Prerequisites#
Kleidia Requirements#
- Kleidia deployed and accessible to users
- Local agent installed on user workstations
- YubiKey 5 series (or newer) with FIDO2 support
Azure Entra ID Requirements#
- Azure Entra ID Premium P1 or P2 license
- FIDO2 security key authentication method enabled
- User has appropriate licensing
FIDO2 Registration Process#
Step 1: Set FIDO2 PIN in Kleidia#
Before registering the YubiKey with Azure Entra ID, users must set a FIDO2 PIN:
- Navigate to Dashboard > YubiKeys in Kleidia
- Select the YubiKey to configure
- Open the FIDO2 management card
- In the PIN tab, set a FIDO2 PIN (4-63 characters)
Note: FIDO2 PIN is separate from PIV PIN. Users should track both.
Step 2: Register Security Key with Azure Entra ID#
- Navigate to Microsoft Security Info
- Click Add sign-in method
- Select Security key
- Choose USB device
- Follow the prompts:
- Insert YubiKey when prompted
- Enter FIDO2 PIN
- Touch the YubiKey when LED flashes
- Name the security key (e.g., “Work YubiKey - Kleidia Managed”)
Step 3: Verify Registration in Kleidia#
After registration, the service domain should appear in Kleidia:
- Navigate to the YubiKey in Kleidia
- Open the FIDO2 card
- Go to the Credentials tab
- Enter FIDO2 PIN to view registered services
- Verify
login.microsoftonline.comappears in the list
Dual Deployment: PIV + FIDO2#
Organizations can leverage both PIV and FIDO2 capabilities on the same YubiKey:
Use Cases#
| Authentication Scenario | Recommended Method |
|---|---|
| Windows Smart Card Login | PIV Certificate |
| VPN/Network Access | PIV Certificate |
| Microsoft 365 | FIDO2 (WebAuthn) |
| Azure Portal | FIDO2 (WebAuthn) |
| Web Applications (SSO) | FIDO2 (WebAuthn) |
| Code Signing | PIV Certificate (9c) |
| Email Signing (S/MIME) | PIV Certificate (9d) |
Best Practices for Dual Deployment#
PIN Management
- PIV PIN and FIDO2 PIN are independent
- Consider using the same PIN for user convenience (but understand the security trade-off)
- Document both PINs in user’s password manager
Certificate vs. Passkey
- Use PIV certificates for legacy systems and smart card requirements
- Use FIDO2 for modern cloud services and phishing-resistant authentication
Recovery Planning
- PIV: PUK can unblock locked PIN
- FIDO2: No PUK equivalent; locked FIDO2 requires applet reset
- Maintain backup authentication methods in Azure Entra ID
Conditional Access Configuration#
Example Policy: Require FIDO2 for Sensitive Resources#
{
"displayName": "Require FIDO2 Security Key for Azure Portal",
"state": "enabled",
"conditions": {
"applications": {
"includeApplications": [
"Azure Portal"
]
},
"users": {
"includeUsers": ["All"]
}
},
"grantControls": {
"operator": "AND",
"builtInControls": [
"mfa"
],
"authenticationStrength": {
"id": "00000000-0000-0000-0000-000000000004"
}
}
}Note: Authentication strength ID
00000000-0000-0000-0000-000000000004corresponds to “Phishing-resistant MFA” which requires FIDO2 or certificate-based authentication.
Creating a Custom Authentication Strength#
To specifically require YubiKey FIDO2 authentication:
- Navigate to Entra Admin Center > Protection > Authentication methods > Authentication strengths
- Create a new custom strength
- Select only FIDO2 security key
- Optionally add Certificate-based authentication for PIV fallback
- Use this custom strength in Conditional Access policies
Troubleshooting#
Common Issues#
“No security key registered” during sign-in#
- Ensure FIDO2 PIN is set in Kleidia
- Verify key is registered at aka.ms/mysecurityinfo
- Check if FIDO2 method is enabled for the user in Entra ID
“Wrong PIN” error during registration#
- Verify you’re using FIDO2 PIN (not PIV PIN)
- Check FIDO2 PIN retries in Kleidia FIDO2 card
- If locked, reset FIDO2 applet in Kleidia (erases all passkeys)
Registration fails with “Security key not supported”#
- Ensure YubiKey firmware supports CTAP 2.0+
- Check browser compatibility (Chrome, Edge, Firefox supported)
- Verify WebAuthn/FIDO2 is enabled in Azure Entra ID
User can’t sign in after YubiKey deletion in Kleidia#
When a YubiKey is deleted in Kleidia with factory reset:
- All FIDO2 credentials are erased from the key
- Azure Entra ID still shows the key as registered
- User must manually remove the old key from Security Info
- Re-register the reset YubiKey as a new security key
Diagnostic Commands#
Check FIDO2 status on YubiKey (via ykman):
# List FIDO2 info
ykman fido info
# List registered credentials (requires PIN)
ykman fido credentials listSecurity Considerations#
Phishing Resistance#
FIDO2/WebAuthn provides strong phishing resistance because:
- Credentials are bound to specific domain origins
- Private keys never leave the YubiKey
- Registration and authentication require physical presence (touch)
PIN Protection#
- FIDO2 PIN protects against stolen device scenarios
- 8 retry attempts before lockout
- Lockout requires FIDO2 applet reset (erases all credentials)
Credential Management#
- Kleidia provides visibility into registered RP domains
- Full usernames are not displayed for privacy
- Factory reset erases all FIDO2 credentials when YubiKey is deleted