How to Enable Require Risk Remediation in Conditional Access

  • Post author:
  • Post category:Microsoft Entra
  • Post last modified:
  • Reading time:8 mins read
  • Post published:

No so long ago, Microsoft released a new grant control in Conditional Access named Require Risk Remediation. At the time of writing this article, the feature is in Preview, which means it is somewhat still in development. Never the less, in this article I will explore what the Require Risk Remediation control does and what it doesn’t do, including the steps to enable it.

Enable the Require Risk Remediation policy

To enable the new Risk Remediation feature in Conditional Access, you must first address any existing CA policies that currently target user risk.

Specifically, you need to identify policies that require either a “password change” or “sign-in frequency every time” as a grant control. These policies must be set to Report-only or Off to prevent any conflicts with the new feature.

To quickly find these policies, simply head over to the Conditional Access blade in the Entra portal and use the available filters to identify policies based on these specific conditions.

Filter CA policies in Microsoft Entra
Filter CA policies in Microsoft Entra

Once these existing user risk policies are no longer impacting users, follow the steps below to create a new policy that efficiently covers both user risk scenarios.

  1. Log in to the Microsoft Entra admin center
  2. Expand Entra ID and select Conditional Access
  3. Click Create new policy
  4. Define a name, assign a user and target all resources
  5. Select the High user risk condition
  6. Select the Require risk remediation grant control
  7. Enable and save your policy

Previous self-service risk remediation options

Previously, allowing end-users to self-remediate both sign-in risk and user risk (bearing in mind that user risk can be impacted by sign-in risk) required many Conditional Access policies. These policies (as many as 4) were necessary to address two distinct scenarios: the passwordless flow and the password + MFA flow.

For the Password + MFA scenario, you would have needed to create a CA policy which targeted your risky users with the grant control set to Require Password Change. Optionally, you could also set a session control to require Sign-in Frequency to Every time.

For the Passwordless scenario, you would have needed to create a separate CA policy. This policy would target your risky users and leverage the Require authentication strength control (set to an appropriate passwordless strength) along with a session control to require Sign-in frequency every time.

Once the user successfully navigates through these flows, either by resetting their password or completing a passwordless sign-in, the risk level will automatically reset, removing the need for an admin to intervene.

A core issue with this design is that it can significantly bloat your Conditional Access policies, which directly makes them harder to manage, therefore indirectly making your environment potentially less secure due to the increased risk of misconfiguration.

What does Require Risk Remediation do better?

Well it takes a little reading through the lines to understand exactly how the Require Risk Remediation control is better, but it really only comes down to simplification of your Conditional Access design. 

For the legacy Required Password Change control, when a user resets their password, Entra ID updates the account’s “last password change”, or more specifically, the StsRefreshTokenValidFrom timestamp. Any existing refresh (session) token issued before this timestamp is globally “marked” as invalid and will be rejected the next time the device tries to use it. However, this still leaves a gap… once the risk is remediated and session tokens are invalidated, Access Tokens can still be used up until their expiry time, which is 1hr from the point they are issued. So this leaves a gap where by if a token is stolen, an attacker could continue to have plenty of time to access the compromised tenant.

For the legacy Passwordless flow, the sign-in frequency control sets an immediate expiry time for every session token issued, which means a new session token must be obtained on re-authentication. This invalidates old session tokens, but the same gap for Access tokens are still there…

If we read the preview documentation on Microsoft Learn for risk remediation, it does specifically mention that previous session are revoked, but there is no clarity on whether this is the same as a manual session revocation (much like in Entra ID Protection), or whether it is just implied as previous sessions are invalidated in both scenarios anyway as mentioned above.

User session tokens are revoked
User session tokens are revoked

Either way, the outcome is the same using the Require Risk Remediation control. Previous session tokens are invalidated, but Access Tokens will stay live until they expire, usually within 1 hour.

Additional configuration needed to invalidate Access Tokens

As mentioned above, with just the Require Risk Remediation control in place, this leaves a 1 hour window where an attacker can potentially further compromise your tenant and ensure their access persists. I also wanted to be doubly sure about this, as the Microsoft documentation alludes to this control increasing protection, where being pragmatic, it does not. I tested this by implementing the Require Risk Remediation policy for my test user “Patrick” and simulating a high-risk scenario. 

First I connect to Microsoft Graph with PowerShell in interactive (delegated) mode and stored the active Access Token which was issued at 08:04 am.

I then used the Tor browser to increase the User Risk for my user “Patrick” to Medium (which is the Condition for my require risk remediation CA policy).

User has a high risk
User has a medium risk level

As you can see, the CA policy with Require Risk Remediation forced me to change my account password and complete MFA, which has remediated the risk level.

Patrick update password
Patrick update password

This then set the “Sign-in session valid from date time value” (or StsRefreshTokenValidFrom value) to 08:09 am on Patricks account, 5 minutes after the Access Token was issued.

Patrick signin session
Patrick signin session

Then, re-using that Access Token, which was issued before I remediated the risk, I can still authenticate to Microsoft Graph and access resources.

Connect to Microsoft Graph with old Access Token
Connect to Microsoft Graph with old Access Token

Finally, to validate that I am still using the old access token, the image below highlights the expiry of the token I used being 09:04, which shows it was issued 1 hour prior at 08:04.

Decoded Token Including Time
Decoded Token Including Time

The clarifies, that the Require Risk Remediation grant control still only invalidates Session Tokens (not Access Tokens), as I can still authenticate to resources protected by Entra after the older session tokens are revoked.

Risk Remediation only supports User risk

The solution (currently in preview) isn’t perfect right now. It only covers user risk, which actually just adds additional complexity to your Conditional Access structure. This is because. 

  1. You still need to create additional policies for Sign-in risk. 
  2. You need to ensure there is no policy overlap as this could otherwise cause a block.
  3. A single Require Authentication Strength control is automatically implemented covering Passwords and Passwordless, which defeats the purpose of authentication strengths a little… (MFA downgrade attack maybe…?)
  4. The sign-in risk of a user can impact the user risk level and requires MFA to resolve, which may confused users oo the expected remediation experiences.

Still, once implemented and understood, its still better than how you may have stood without the Risk Remediation policy in place. However, without full coverage currently, it’s just another thing for admins to “figure out” before it eventually changes again.

Increasing protection by invalidating Access Tokens

To close the one-hour access window left open by lingering Access Tokens, the solution is Continuous Access Evaluation (CAE). CAE enables near real-time token revocation, rather than waiting for the token’s standard expiry time (typically 1 hour). Instead of the Resource Provider (for example, Exchange Online) accepting a valid-looking Access Token, CAE allows the Resource Provider to reject the active Access Token and force a claim challenge, requiring the user to re-authenticate and effectively revoking the session.

CAE, for supported clients, like the Outlook and OneDrive client, works by default. This essentially means that when critical events are detected by the resource provider like High Risk, or manual refresh token revocation (which just updates the StsRefreshTokenValidFrom property on a user, the same as remediating risk), it can automatically challenge the access token requiring re-authentication to the service. This process, for devices with a valid PRT, is seamless for supported clients, otherwise will require a user to re-signin.

For added protection to the default, CAE can be enforced with a Conditional Access policy in “Strict mode”, but this requires careful planning and consideration. As such, you should look through the supporting Microsoft documentation carefully.

Wrapping up

The new Require Risk Remediation policy is a good step forward for reducing complexity in what is a sometime a difficult to understand feature (Conditional Access). Practically speaking, you can use it to reduce the total number of policies in your environment, where otherwise you would be force to create multiple policies to achieve the same outcome. However, right now it has its “special considerations” so while it is worth a test, I won’t be rushing to roll this out on mass just yet.

Daniel Bradley

Daniel Bradley is a UK-based technical architect and Microsoft MVP in Security. He specialises in Microsoft Entra, Intune, and Microsoft Graph PowerShell and is the author of Microsoft Graph PowerShell for Administrators. He writes and edits Our Cloud Network using experience gained from working with Microsoft cloud environments.

Leave a Reply