Respond to risky users and sign-ins
Use risk signals and risk-based policies and run an incident: revoke, recover the account and verify.
By Invicly Tech, , in Microsoft Entra & Microsoft 365 Administration. About 11 minutes to read.
In short
Microsoft Entra ID Protection scores two kinds of risk: sign-in risk, the chance that one sign-in was not the real user, and user risk, the chance that the account itself is compromised. Risk-based Conditional Access policies can ask for MFA or a secure password change automatically, and admins handle the rest: revoke sessions, recover the account, then verify that the attacker is out. Full risk features need Microsoft Entra ID P2.
Think of it like this: Sign-in risk is a bank questioning one odd card payment; user risk is the bank deciding the card itself may be stolen and issuing a new one.
Explained simply
Microsoft Entra ID Protection watches sign-ins and accounts for signs of attack. It looks at things like sign-ins from anonymous networks, impossible travel between two countries, or a password that appeared in a leak. Each clue is a risk detection.
Risk comes in two kinds. Sign-in risk is about one sign-in: was this really the user? User risk is about the account: has it probably been taken over? Both get a level of low, medium or high.
You can let policies react for you. A Conditional Access policy can say: if sign-in risk is medium or high, ask for MFA. Another can say: if user risk is high, require a secure password change. If the real user passes these checks, the risk is cleared without a help-desk call.
When an account is truly compromised, an admin runs a short incident. Contain it by revoking sessions. Recover it by resetting the password and removing anything the attacker added. Verify that new sign-ins are clean. Write down what happened.
Full risk reports and risk-based policies need Microsoft Entra ID P2. Without it, you can practise the response steps in a free lab tenant with a normal test user, and use the synthetic risk records in this article.
Press Play on a diagram to walk through it one step at a time.
- 1Confirm
Read risk detections and sign-ins
- 2Contain
Revoke sessions, block sign-in if needed
- 3Recover
Reset password, re-register MFA, remove attacker changes
- 4Verify
New sign-ins clean, risk remediated
- 5Record
Timeline, actions, lessons
- About one authentication
- Example: anonymous IP, atypical travel
- Real-time or offline detection
- Policy usually requires MFA
- About the account over time
- Example: leaked credentials
- Rises from risky sign-ins too
- Policy requires a secure password change
- 1Detect
ID Protection raises risk
- 2Automate
Risk policy asks for MFA or reset
- 3Investigate
Admin reads unresolved risky users
- 4Respond
Revoke, recover, verify
- 5Improve
Tune policies and training
- Back to step 1
In depth
Reading risk detections
In the Entra admin center, ID Protection has three main reports: Risky users, Risky sign-ins and Risk detections. Each detection has a type, a level, a timing (real-time during sign-in, or offline, found later) and a source. Examples include anonymous IP address, atypical travel, unfamiliar sign-in properties, malicious IP address, password spray, leaked credentials and anomalous token.
Read detections together with the sign-in logs. A single anonymous-IP sign-in followed by successful MFA from the user's usual phone may be a privacy VPN. Atypical travel plus a new inbox rule plus an MFA method added from the same IP is a compromise. The level alone does not decide; the surrounding evidence does. Leaked credentials detection needs password hash sync for hybrid users.
- Real-time detections can trigger policies at sign-in
- Offline detections arrive later and raise user risk
- Risk states: at risk, remediated, dismissed, confirmed compromised
- Combine with audit and mailbox evidence
Risk-based Conditional Access
Microsoft recommends building risk policies in Conditional Access. A common pair is: all users, sign-in risk medium and high, grant access with MFA and sign-in frequency set to every time; and all users, user risk high, grant access with a secure password change plus MFA. Exclude emergency access accounts and roll out in report-only mode first to see who would be affected.
Self-remediation only works if users are already registered for MFA, and for password change they need self-service password reset; for hybrid users that requires password writeback. Users who cannot self-remediate are blocked and need the help desk. Newer options, such as requiring risk remediation, may also be available; check the current docs for your tenant.
- 1Sign-in
From a new country at 02:00
- 2Detect
Real-time sign-in risk: medium
- 3Policy
Conditional Access requires MFA
- 4User passes MFA
Number match on known phone
- 5Risk remediated
Sign-in allowed and logged
Contain and recover
Containment comes first. Revoke the user's sessions so refresh tokens and session cookies stop working; consider blocking sign-in during the investigation; and if a device is involved, ask the endpoint team about isolation. Revocation is not instant everywhere: an access token already issued may stay valid until it expires, typically around an hour, unless the service supports continuous access evaluation.
Recovery removes the attacker's foothold. Reset the password, or let the user do a secure reset. Review authentication methods and remove any the user did not add. Check mailbox inbox rules, forwarding and delegates. Review app consents granted by the user. Check whether the account added other users to groups or roles. Then re-enable sign-in and ask the user to re-register MFA if needed.
- Revoke sessions, block sign-in if needed
- Reset password
- Remove unknown MFA methods
- Remove rules, forwarding, delegates
- Review app consents and group changes
Verify and close
Verification proves the fix worked. Check that new sign-ins come from the user's known device and location and pass MFA. Confirm no new risk detections appear over the following days. Check the user's risk state is remediated, or dismissed by an admin with a recorded reason. Re-run the mailbox and audit checks to make sure no new rules or consents appeared.
Use admin actions carefully. Confirm user compromised sets user risk to high and feeds Microsoft's models; use it when you are sure. Dismiss user risk clears the risk when you are sure activity was safe; do not use it just to silence the report. Write a short record: timeline, actions, evidence of verification and lessons, such as enabling number matching or blocking legacy authentication.
Learn it in 5 short steps
About 30m each. Track them with a timer in your plan.
- 1Read user and sign-in risk~30m
- 2Apply risk-based policies~30m
- 3Revoke sessions~30m
- 4Recover the account~30m
- 5Verify after the change~30m
Key points
- Configure risk-based policies in Conditional Access; the legacy risk policies inside ID Protection were set to retire on 1 October 2026.
- Users must be registered for MFA before risk policies can let them self-remediate.
- Revoking sessions invalidates refresh tokens, but issued access tokens may last until they expire unless the app supports continuous access evaluation.
- Recovery means removing what the attacker added: inbox rules, MFA methods, app consents and forwarding.
- Verify with fresh sign-in logs and a risk state of remediated or dismissed, not by hope.
Key terms
Tap a card to flip it. 0/6 known
Examples
# Lab tenant: contain and inspect a risky user
Connect-MgGraph -Scopes "User.RevokeSessions.All","IdentityRiskyUser.ReadWrite.All","UserAuthenticationMethod.Read.All"
$u = Get-MgUser -UserId "megan@contoso.example"
Revoke-MgUserSignInSession -UserId $u.Id
Get-MgRiskyUser -Filter "id eq '$($u.Id)'" | Select-Object UserPrincipalName, RiskLevel, RiskState
Get-MgUserAuthenticationMethod -UserId $u.Id | Select-Object Id, AdditionalPropertiesRevoke, then check risk state and look for MFA methods the user did not add.
Incident drill with synthetic risk data
Tenant-free or lab. Synthetic record: user omar@contoso.example, user risk high, detections leaked credentials (offline) and atypical travel from 203.0.113.50 at 03:10 UTC. Step 1: review sign-ins: one success from 203.0.113.50 using a legacy client. Step 2: contain: revoke sessions and block sign-in. Step 3: recover: reset the password, remove an unknown phone method added at 03:14, delete an inbox rule forwarding to an outside address. Step 4: verify: unblock, Omar signs in from his laptop with MFA, risk state shows remediated. Step 5: lesson: block legacy authentication with Conditional Access.
{
"userPrincipalName": "omar@contoso.example",
"riskLevel": "high",
"riskState": "atRisk",
"detections": [
{ "type": "leakedCredentials", "timing": "offline", "detectedUtc": "2026-11-21T01:00Z" },
{ "type": "atypicalTravel", "timing": "offline", "ip": "203.0.113.50", "detectedUtc": "2026-11-21T03:10Z" }
],
"authMethodAdded": { "type": "phone", "timeUtc": "2026-11-21T03:14Z", "ip": "203.0.113.50" }
}Contain, recover and verify in PowerShell
Lab tenant with a test user. Prerequisites: permissions to update users and authentication methods, and Exchange Online PowerShell for mailbox checks. The script blocks sign-in, revokes sessions, lists methods and inbox rules for review, and later re-enables the account. Expected evidence: sign-in logs show failures while blocked, then successful MFA sign-ins after re-enable. Rollback: set AccountEnabled back to true if you blocked the wrong user.
Connect-MgGraph -Scopes "User.ReadWrite.All","User.RevokeSessions.All","UserAuthenticationMethod.ReadWrite.All"
$id = (Get-MgUser -UserId "omar@contoso.example").Id
Update-MgUser -UserId $id -AccountEnabled:$false
Revoke-MgUserSignInSession -UserId $id
Get-MgUserAuthenticationPhoneMethod -UserId $id # remove unknown ones after review
Connect-ExchangeOnline
Get-InboxRule -Mailbox "omar@contoso.example" | Select-Object Name, ForwardTo, RedirectTo
# After password reset and clean-up:
Update-MgUser -UserId $id -AccountEnabled:$trueQuick reference
- Sign-in risk = this sign-in; user risk = this account. Levels: low, medium, high.
- Build risk policies in Conditional Access, report-only first, exclude break-glass accounts.
- Users must be registered for MFA (and SSPR) to self-remediate.
- Revoke-MgUserSignInSession with the user object ID invalidates refresh tokens and sessions.
- Recover: reset password, remove unknown MFA methods, rules, forwarding, consents.
- Confirm compromised only when sure; dismiss risk only with a recorded reason.
- Leaked-credentials detection for hybrid users needs password hash sync.
Common mistakes
- Dismissing risk to stop alerts without checking for attacker changes such as inbox rules.
- Resetting the password but leaving an attacker's authenticator app registered.
- Turning on a high-risk block policy for everyone without excluding emergency access accounts.
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Sort these into sign-in risk or user risk: anonymous IP sign-in; leaked credentials; atypical travel on one sign-in; admin confirmed compromised.
- Exercise 2medium
Describe two risk-based Conditional Access policies for a 300-person company, including exclusions and rollout.
- Exercise 3hard
Write the verification checklist you run before closing a compromised-account incident.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Can I use ID Protection without P2?
- With Entra ID Free or P1 you see limited risk information. Full reports, risk-based Conditional Access conditions and detailed detections need P2.
- Should risky users be blocked automatically?
- Usually it is better to require MFA or a secure password change so real users can fix it themselves. Blocking suits very high-value accounts or users who cannot self-remediate.
- Does resetting the password sign the attacker out?
- Not always straight away. Revoke sessions as well, and remove any MFA methods or app consents the attacker added.