How To Configure CAP At Azure With Claims
Objective
Authentication Context in Microsoft Entra lets us make our app ask for stronger sign-in (like MFA or FIDO2) — but only when needed.
Instead of always asking users for multi-factor authentication (MFA), we can ask for it only during sensitive actions.
With this feature:
-
Define labels like
c1,c2(called authentication contexts) -
Connect those to Conditional Access policies (which define what kind of sign-in is required)
-
App passes
acr_values=c1when it needs stronger authentication.
As per OIDC spec -
In Autherixation Request-"acr_values
OPTIONAL. Requested Authentication Context Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication Context Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter."In ID Token -
"acr
OPTIONAL. Authentication Context Class Reference. String specifying an Authentication Context Class Reference value that identifies the Authentication Context Class that the authentication performed satisfied. The value "0" indicates the End-User authentication did not meet the requirements of ISO/IEC 29115 [ISO29115] level 1. For historic reasons, the value "0" is used to indicate that there is no confidence that the same person is actually there. Authentications with level 0 SHOULD NOT be used to authorize access to any resource of any monetary value. (This corresponds to the OpenID 2.0 PAPE [OpenID.PAPE] nist_auth_level 0.) An absolute URI or an RFC 6711 [RFC6711] registered name SHOULD be used as the acr value; registered names MUST NOT be used with a different meaning than that which is registered. Parties using this claim will need to agree upon the meanings of the values used, which may be context specific. The acr value is a case-sensitive string."
Following are the steps required to set up the entire flow:
Environment
EPM Windows Agent
Procedure
Step 1: Create an Authentication Context
Authentication Contexts act as flags in Entra to trigger Conditional Access policies.
-
Go to:
Microsoft Entra Admin Center → Protection → Conditional Access → Authentication Contexts -
Click + New authentication context
-
Fill in:
-
Name: e.g., requireMFA_Auth_Context
-
Description: e.g., Requires MFA
-
-
Click Save
-
Copy the ACR short name, e.g.,
c1
This short name will be used in the acr_values param in OIDC request
Step 2: Create an Authentication Strength
If the built-in strengths don't meet your needs, create a custom authentication strength.
-
Go to:
Microsoft Entra Admin Center → Protection → Authentication Methods → Authentication Strengths -
Click + Add authentication strength
-
Name it: e.g., RohitMFATest2
-
Select any required allowed methods:
-
FIDO2 security key
-
Microsoft Authenticator
-
Sms
-
-
Click Create
Step 3: Create a Conditional Access Policy
-
Go to:
Microsoft Entra Admin Center → Protection → Conditional Access -
Click + New policy
-
Name: e.g.,TestingStepUp
-
Under Assignments:
-
Users: Select users or groups
-
Target resources:
-
Choose Authentication Contexts
-
Select the one created earlier (requireMFA_Auth_Context)
-
-
-
Under Access controls → Grant:
-
Select Require authentication strength
-
Select the built-in or custom strength (e.g., RohitMFATest2)
-
-
Enable the policy → Report-only or On
Save the policy.
This KB article is provided for educational purposes only and is not actively maintained. As Azure features may change, we highly recommend referring to the official Microsoft documentation for the most up-to-date guidance. For further support, please reach out to Microsoft Support.