FIDO2 security keys in Azure AD Conditional Access: Acceptance in OAuth 2.0 Authorization Code flow with PKCE remains undefined
0 reputation · 12 Nov 2022, 00:38 UTC
0 reputation · 12 Nov 2022, 00:38 UTC
Determine whether a registered FIDO2 security key can be used as the MFA factor for a client application that initiates an OAuth 2.0 Authorization Code flow with PKCE against Azure AD.
Azure AD Conditional Access must be enabled for FIDO2, the key must be registered in the tenant, and the application must request the appropriate scopes. Documentation confirms browser‑based sign‑in works, but the behavior for application sign‑in via the Authorization Code flow is not explicitly defined.
34775 reputation · 12 Nov 2022, 09:05 UTC
Yes. Azure AD will accept a registered FIDO2 security key as the MFA factor for an OAuth 2.0 Authorization Code flow with PKCE, provided the interactive sign-in is performed in a WebAuthn-capable browser. The client application does not present the key directly; Azure AD prompts for it during the browser-based authorization request and Conditional Access evaluates the MFA grant there.
Documentation emphasizes browser sign-in, which creates the impression that app sign-in is different. In practice the app sign-in is browser sign-in. The only variable is whether the browser surface used by the app supports WebAuthn. If it does, FIDO2 works. If it does not, the FIDO2 prompt cannot complete and the flow fails.
Failure is almost always a web view capability issue, not a protocol issue. Workarounds that avoid WebAuthn dependency are:
These methods work in any WebAuthn-capable or limited web view.
Assumption: Azure AD Premium P1/P2 is in use and the app registration is configured as a public client with PKCE. Uncertainty remains around custom embedded web views on older OS versions where WebAuthn is not available.
One diagnostic detail that changes the recommendation: which browser surface your app uses for interactive auth — system browser vs embedded web view, and the OS/WebView version. Confirm that to decide if FIDO2 can be relied on or if you must fall back to Authenticator-based MFA.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.