SOC Identity Responder: contain a compromised account without handing out admin roles
A new built-in Entra role lets security analysts disable users, revoke sessions and reset passwords from Microsoft Defender, and nothing else. Here's what it can and can't do, and how to set it up with PIM.
On this page
When an account is compromised, the first few minutes matter. The attacker has a session and possibly a password, and the analyst who spotted it in Microsoft Defender needs to cut them off. In many organisations that analyst can't. Either they wait for someone on the identity team, or they've been given broad roles such as User Administrator or Helpdesk Administrator "just in case", which lets them change far more than they need to.
Microsoft has added a built-in role for exactly this job: Entra SOC Identity Responder, in public preview. It holds four permissions, all about containment, and it can only act on users who don't hold admin roles.
What the role can do
| Permission | What it lets the analyst do |
|---|---|
microsoft.directory/users/disable | Disable an account, so it can't sign in |
microsoft.directory/users/enable | Re-enable it once the incident is closed |
microsoft.directory/users/invalidateAllRefreshTokens | Revoke sign-in sessions, forcing the user (or attacker) to sign in again |
microsoft.directory/users/password/update | Reset the password |
Microsoft describes it as a role for containment actions taken from the Microsoft Defender portal. The actions are still enforced and audited by Entra, so they show up in the audit log like any other change. The role's template ID is 58f930cc-fcf4-4152-852c-1d7dbf502139, which you can look up with the GUID lookup.
Borrowed admin roles
User Administrator, Helpdesk Administrator and similar
- Can change far more than containment needs
- Often assigned permanently, just in case
- Hard to justify in an access review
- Or the SOC waits for the identity team
Entra SOC Identity Responder
Built for incident response
- Disable, enable, revoke sessions, reset password
- Only on users without admin roles
- Assignable to a role-assignable group
- Works with PIM for just-in-time use
What it can't do
The limits are as useful as the permissions, because they tell you where the identity team still has to step in.
- No admin accounts. Like Security Administrator and Security Operator, the role is limited to non-administrative users and can't act on privileged accounts. A compromised admin still needs a Privileged Authentication Administrator or Global Administrator.
- No authentication methods. It can't see or remove a user's MFA methods. If the attacker registered their own Authenticator or phone number, someone with Authentication Administrator has to remove it.
- No devices, groups or apps. Disabling a device, removing group memberships or revoking app consent are separate jobs for other roles.
One detail worth knowing: Microsoft notes that the ability to reset a password includes updating the phone and alternative email properties that self-service password reset uses. That's another reason to treat it as a privileged role, which Microsoft labels it as.
How containment fits together
Order matters. Disable the account first so no new sign-ins succeed, then revoke sessions so existing refresh tokens stop working, then reset the password before you re-enable anything. Revoking sessions doesn't instantly kill access tokens that have already been issued. They run until they expire, unless the app supports continuous access evaluation, so a disabled account plus revoked sessions is the combination you want.
Setting it up properly
The role supports role-assignable groups and works with PIM, so a sensible design is an eligible assignment to a group that holds your SOC analysts.
- Create a role-assignable security group, for example
ROLE-SOC-Identity-Responders. Only Global Administrators, Privileged Role Administrators and the group's owners can manage its membership, which protects it from tampering. Don't give the SOC analysts ownership of it. - Make the group eligible for Entra SOC Identity Responder in PIM, rather than permanently active.
- Set activation rules: a short maximum duration, a justification, and ideally an authentication context that requires phishing-resistant MFA. Skip approval, because waiting on an approver defeats the point of a fast containment role.
- Remove the old roles analysts were holding for containment, once the new one is tested.
Connect-MgGraph -Scopes "Group.ReadWrite.All","RoleManagement.ReadWrite.Directory"
# Role-assignable group for the SOC
$group = New-MgGroup -DisplayName "ROLE-SOC-Identity-Responders" -MailEnabled:$false `
-MailNickname "role-soc-identity-responders" -SecurityEnabled -IsAssignableToRole:$true
# Make the group eligible for the role for a year
New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest -BodyParameter @{
Action = "adminAssign"
PrincipalId = $group.Id
RoleDefinitionId = "58f930cc-fcf4-4152-852c-1d7dbf502139" # Entra SOC Identity Responder
DirectoryScopeId = "/"
Justification = "SOC containment role"
ScheduleInfo = @{ StartDateTime = Get-Date; Expiration = @{ Type = "AfterDuration"; Duration = "P365D" } }
}Analysts then activate it in the portal, or from PowerShell as described in activating PIM roles with Microsoft Graph.
Containment from PowerShell
The Defender portal is the intended place to take these actions, but it's useful to have a fallback. With the role active, an analyst can do the same from Microsoft Graph PowerShell:
Connect-MgGraph -Scopes "User.EnableDisableAccount.All","User.RevokeSessions.All"
$upn = "jane.doe@contoso.com"
Update-MgUser -UserId $upn -AccountEnabled:$false # 1. stop new sign-ins
Revoke-MgUserSignInSession -UserId $upn # 2. invalidate refresh tokensAfterwards, the user sees AADSTS50057 (account disabled) if they try to sign in. To see what the attacker did before you stepped in, paste their sign-ins into the sign-in log explainer or use the queries in the KQL library.
Things to check before relying on it
- It's in public preview, so test it in your tenant before writing it into the incident runbook
- For users synced from Active Directory, check how disabling and password resets behave in your setup: attributes mastered on-premises and password writeback both affect the result
- Agree a handover with the identity team for what the role can't do: MFA methods, admin accounts, devices and app consent
- Alert on activations of the role, the same way you'd alert on other privileged roles
- Include the group in your regular access reviews
Is this the same as Security Operator?
No. Security Operator is about managing security events and settings in security tools. SOC Identity Responder is narrowly about directory actions on user accounts: disable, enable, revoke sessions and reset password. Both are limited to non-administrative users for these actions.
Can the role unlock an account locked by Smart Lockout?
No. Smart Lockout clears on its own. The role is for disabling and resetting, not unlocking.
Does it need extra licences?
Microsoft's announcement doesn't list a licence for the role itself. Using PIM for just-in-time activation needs Entra ID P2 or Entra ID Governance, as usual.