Immediate response
First 10 minutes
Stop active access without destroying the evidence you need to understand the incident. Use a separate, trusted administrator account.
Checklist privacy: selections are stored only for this browser session. They are not sent to CODWEBPRO or saved as incident evidence.
Know what your tenant can do
Start with Microsoft 365 Business Standard. Use the fallback in this SOP when a premium signal or response tool is not licensed, and activate only the least role needed for the action.
| Capability | Business Standard | Practical boundary | Microsoft source |
|---|---|---|---|
| Entra sign-in and audit logs | Limited | Portal view and CSV export are available through Entra ID Free, with 7-day retention. P1 or P2 raises retention to 30 days and is required for programmatic sign-in-log access through Microsoft Graph. | Retention |
| Purview Audit Standard | Available after activation | Business Standard includes search, CSV export, Search-UnifiedAuditLog and 180-day standard retention, but unified audit ingestion is not enabled by default for SMB plans. Enable it before an incident; activation does not recover earlier events. | Enable auditing |
| Mailbox auditing | Available | On by default for user, delegate and administrator mailbox operations. Investigate through Purview Audit. | Mailbox auditing |
| MailItemsAccessed audit events | Add-on | Business Standard lacks the eligible E3/E5-class audit entitlement. Fall back to general mailbox audit events and message trace when this event is unavailable. | MailItemsAccessed investigation |
| Message trace | Available | Exchange Online keeps trace data for 90 days; each query can cover at most 10 days. | Message trace FAQ |
| Rules, forwarding and delegates | Available | Exchange admin center and Exchange Online PowerShell are included. RBAC still controls who may inspect or change them. | Exchange Online |
| Disable, reset and revoke sessions | Available | Cloud-account disable, cloud-password reset, authentication-method cleanup and refresh-token revocation are available. Hybrid writeback is separate. | Revoke access |
| Identity Protection risk | Limited | Basic risk visibility is limited. Risk details, history, Graph risk reporting and automatic risk remediation require Entra ID P2. | Identity Protection |
| Conditional Access | Add-on | Standard policies require Entra ID P1. User-risk and sign-in-risk policies require P2. | Plan Conditional Access |
| Threat Explorer and automated email remediation | Add-on | Threat Explorer, campaigns and automated investigation and response require Defender for Office 365 Plan 2. | Defender for Office 365 |
| Purview eDiscovery cases, search and purge | Add-on | Do not assume Business Standard is sufficient. Current Purview eDiscovery case guidance requires Microsoft 365 Enterprise E3 or E5 for both administrators and case users. Use message trace for baseline investigation; prefer Defender for Office 365 Plan 2 for operational malicious-email remediation. | eDiscovery requirements |
| Hybrid password writeback | Add-on | Writing a cloud reset back to on-premises Active Directory requires Entra ID P1, P2 or another eligible plan. | SSPR licensing |
| Endpoint isolation and full MDM response | Add-on | Business Standard does not include Intune or Defender for Business. Escalate device actions to the licensed endpoint owner. | Plan comparison |
Run Get-AdminAuditLogConfig | Format-List UnifiedAuditLogIngestionEnabled in Exchange Online PowerShell. If the result is False, an operator holding the Purview Audit Logs role must run Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true. Purview searches remain empty until ingestion is enabled, and only future activity is collected.
Least-privilege action map
Activate roles just in time where possible. For delegated Microsoft Graph work, the operator needs both the listed OAuth scope and the supported Entra role. Exchange roles can be customized, so verify the exact cmdlet and parameter assignment in the tenant.
| Action or command | Minimum portal or RBAC role | Graph or Exchange permission | Business Standard boundary | Microsoft source |
|---|---|---|---|---|
| Read user profile, groups, devices and assigned roles | Directory Readers for directory views. Reports Reader is needed only when opening sign-in or audit logs. | User.Read.All, GroupMember.Read.All, Device.Read.All and RoleManagement.Read.Directory. | Available. | Entra roles |
| View Risky users | Security Reader. | IdentityRiskyUser.Read.All. | Limited; full detail requires P2. | List risky users |
| Confirm compromised or dismiss risk | Portal: Security Operator. Graph: Security Administrator. | IdentityRiskyUser.ReadWrite.All. | Add-on; requires P2. | Remediate risk |
| View and export sign-in logs | Reports Reader. | AuditLog.Read.All for Get-MgAuditLogSignIn. | Portal and CSV export are available for 7 days. Get-MgAuditLogSignIn and other Graph sign-in-log access require Entra ID P1 or P2. | Download logs |
Connect-MgGraph and Update-MgUser -AccountEnabled:$false | User Administrator for a supported non-admin; Privileged Authentication Administrator (PAA) for administrator targets, subject to role hierarchy. | User.EnableDisableAccount.All + User.Read.All. Module: Microsoft.Graph.Users. | Available; synchronized users must be disabled in the authoritative source. | Update user |
Revoke-MgUserSignInSession | Password Administrator for an unprivileged target; Privileged Authentication Administrator (PAA) for privileged targets. | User.RevokeSessions.All. Module: Microsoft.Graph.Users.Actions. | Available; revocation can take several minutes and external-user sessions belong to the home tenant. | Revoke sessions API |
| Reset password | Password Administrator for an unprivileged target; PAA for administrator targets. | User-PasswordProfile.ReadWrite.All for Graph. | Available for cloud users; hybrid writeback is an add-on. | Reset password |
| Review or remove authentication methods; require MFA re-registration | Authentication Administrator for non-admins; PAA for administrators. | Method-specific permission, such as UserAuthMethod-Phone.ReadWrite or UserAuthMethod-MicrosoftAuthApp.ReadWrite. Portal re-registration is a composite action. | Available. | Manage methods |
| Disable an Entra device | Cloud Device Administrator. | Device.ReadWrite.All for Graph. | Available; not the same as endpoint isolation. | Emergency access revocation |
| Isolate an endpoint or approve a response | Defender unified RBAC Response (manage), or legacy Security Operator. | Defender RBAC, not a Graph scope. | Add-on; requires a licensed Defender endpoint workload. | Defender permissions |
| Disable a malicious enterprise application or service principal | Cloud Application Administrator. | Application.ReadWrite.All for Graph. | Available; obtain approval before tenant-wide impact. | Enterprise app roles |
Verify or enable unified audit ingestion; Get-AdminAuditLogConfig / Set-AdminAuditLogConfig | Purview Audit Logs role to enable or disable auditing. | Exchange Online PowerShell. Format-List is local and adds no tenant permission. | Required preflight for Business Standard. Enabling is not retroactive. | Enable auditing |
Search or export Purview Audit; Search-UnifiedAuditLog | Purview Audit Reader / View-Only Audit Logs. | Exchange View-Only Audit Logs; module ExchangeOnlineManagement. | Available through Audit Standard after unified audit ingestion is enabled. | Audit search |
| Run message trace | Custom Exchange role group with the Message Tracking management role. | Exchange RBAC; no Graph scope. | Available for 90 days. | Exchange RBAC |
| Review and revoke application consent | Directory Readers for review; Cloud Application Administrator for revocation; Privileged Role Administrator when Microsoft Graph application permissions are involved. | DelegatedPermissionGrant.ReadWrite.All and, when applicable, AppRoleAssignment.ReadWrite.All. | Available; password reset does not remove grants or immediately invalidate existing access tokens. | Manage permissions |
Connect-ExchangeOnline | The operator must hold the scoped Exchange role used by each later cmdlet. | Exchange RBAC; connection alone grants nothing. Module: ExchangeOnlineManagement. | Available. | Connect to Exchange Online |
Get-InboxRule -IncludeHidden + Format-List | Recipient-scoped custom Exchange role containing Get-InboxRule. Global Reader and View-Only Organization Management are explicitly insufficient. | Exchange RBAC. Format-List is local and needs no cloud permission. | Available. | Get-InboxRule |
Get-Mailbox forwarding properties + Format-List | View-Only Recipients. | Exchange RBAC. Format-List adds no permission. | Available. | Exchange roles |
Get-MailboxPermission + Where-Object + Format-Table | View-Only Recipients. | Exchange RBAC. Where-Object and Format-Table run locally. | Available. | Get-MailboxPermission |
Get-RecipientPermission; Get-Mailbox ... GrantSendOnBehalfTo | View-Only Recipients. | Exchange RBAC; no Graph scope. | Available. | Get-RecipientPermission |
| Remove malicious rules, forwarding or delegates | Recipient-scoped custom role containing only the required remove/set cmdlets; Mail Recipients is the broader standard baseline. | Exchange RBAC. Validate each cmdlet and parameter with Get-ManagementRole. | Available. | Find cmdlet permissions |
| Remediate malicious email in Explorer or AIR | Unified RBAC Email & collaboration advanced actions (manage), or legacy custom role with Search and Purge. | Defender RBAC; no Graph scope. | Add-on; requires Defender for Office 365 Plan 2. | Email remediation |
| Remove a secured user from Restricted entities | Unified RBAC Core Security settings (manage), or legacy Security Administrator. | Defender RBAC. | Available through Exchange Online Protection; do this only after control is restored. | Restricted users |
| Restore a user's OneDrive | User for own drive; SharePoint Administrator or site collection administrator for another user. | SharePoint/OneDrive permissions. | Available for the previous 30 days. | Restore OneDrive |
| Restore a SharePoint or Teams document library | Site owner or SharePoint Administrator. | SharePoint site permissions. | Available for the previous 30 days. | Restore a library |
| Configure phishing-resistant authentication methods | Authentication Policy Administrator. | Policy.ReadWrite.AuthenticationMethod. | Limited; registration can be available, but Conditional Access authentication-strength enforcement requires P1. | Deploy phishing-resistant auth |
| Create Conditional Access risk or legacy-authentication policy | Conditional Access Administrator. | Policy.ReadWrite.ConditionalAccess. | Add-on; P1 for standard policy, P2 for risk conditions. | Block legacy authentication |
| Run the Compromised Accounts self-help diagnostic | Any Microsoft 365 administrator role. | No Graph or Exchange permission is documented; the diagnostic runs in the Microsoft 365 admin center. | Available as an optional checkpoint, except in GCC High, DoD and Microsoft 365 operated by 21Vianet. | Diagnostic roles |
Exchange verification: run Get-ManagementRole -Cmdlet <Cmdlet> -CmdletParameters <Parameter>, then inspect Get-ManagementRoleAssignment. This is more reliable than assuming a broad administrator role in a customized tenant.
Know when to start the SOP
Start this procedure when one credible signal suggests that another person or application may control the identity. One signal is enough to investigate. Several related signals should be treated as a confirmed incident until disproved.
User signals
Unexpected MFA prompts, password changes, lockout, missing mail, unknown Sent Items, unfamiliar rules, forwarding, signatures or contacts.
Security signals
Risky user or sign-in detection, impossible travel, unfamiliar IP or device, malware alert, unusual consent grant, mass download or suspicious outbound email.
What to do
Microsoft Entra admin center → Entra ID → Protection → Identity Protection → Risky users → affected user
Complete when
- The trigger and its UTC timestamp are preserved.
- The user response or inability to reach the user is recorded.
- The incident is classified as suspected, confirmed or safe with a reason.
Set priority and initial scope
Triage answers three questions: Is the attack still active? How sensitive is the identity? Is the problem limited to one account?
What to do
Highest priority
Global or privileged administrator, emergency access, service identity, executive or finance mailbox, tenant-wide application consent, active payment diversion or confirmed exfiltration.
Broaden the incident
Do not keep this as a single-user case when the same infrastructure, message, application, device or attacker behavior appears elsewhere.
Microsoft Entra admin center → Entra ID → Users → All users → affected user → Overview, Assigned roles, Groups, Devices, Authentication methods and Sign-in logs
Roles and licensing to expect
Reports Reader can review sign-ins. Security Reader or Security Operator can investigate standard risky-user information. Identity Protection detail and automated risk remediation require Microsoft Entra ID P2 or Microsoft Entra Suite. Privileged identities require appropriately privileged responders.
Complete when
- Severity, incident owner and investigation window are recorded.
- Privileged and high-value access is understood.
- A first decision has been made on single-user or broader scope.
Stop access and further damage
Containment interrupts new access. It does not prove that every token, application session, device or persistence mechanism is gone.
What to do
Entra ID → Users → All users → user → Account status → Edit → clear Account enabled → Save → Overview → Revoke sessions
Microsoft Graph PowerShell containment
Disable the identity and revoke its refresh-token sessionsConnect-MgGraph -Scopes "User.EnableDisableAccount.All","User.Read.All","User.RevokeSessions.All"
Update-MgUser -UserId "<UPN>" -AccountEnabled:$false
Revoke-MgUserSignInSession -UserId "<UPN>"
Save as evidence
Account-enabled state, session-revocation time and result, risk state, device action, administrator identity and any Graph response.
Do not do this
Do not disable emergency access without authorization. Do not remove suspicious configuration before recording it unless the ongoing harm makes immediate removal necessary.
Complete when
- The identity is disabled in its authoritative source.
- Refresh-token sessions are revoked.
- Known compromised devices and independent application access have an owner and containment action.
Build the timeline and blast radius
Work from the identity outward. Establish how the attacker entered, what access continued without prompts, what persistence was created, and what information or people were affected.
What to do
Entra ID → Monitoring & health → Sign-in logs → filter by user and UTC incident window → User sign-ins (interactive) → User sign-ins (non-interactive) → Download
Interactive
The person actively supplies a password, MFA response, biometric, passkey or another authentication factor.
Non-interactive
An application or operating system obtains or refreshes tokens for the user without prompting. One row can contain several attempts.
Mailbox persistence commands
Inbox rules, including hidden rulesGet-InboxRule -Mailbox <UPN> -IncludeHidden |
Format-List Name,Enabled,Description,RedirectTo,ForwardTo,ForwardAsAttachmentTo,DeleteMessage,MoveToFolder,Identity
Mailbox-level forwarding
Get-Mailbox -Identity <UPN> |
Format-List ForwardingAddress,ForwardingSmtpAddress,DeliverToMailboxAndForward
Mailbox delegates
Get-MailboxPermission <UPN> |
Where-Object {$_.AccessRights -like "Full*"} |
Format-Table User,Deny,IsInherited,AccessRights -Auto
Get-RecipientPermission -Identity <UPN>
Get-Mailbox -Identity <UPN> | Format-List GrantSendOnBehalfTo
Connect-ExchangeOnline. View-Only Recipients covers the forwarding and delegate reads, but it does not grant Get-InboxRule. Assign a recipient-scoped custom role containing that cmdlet, and keep remove or set cmdlets out until remediation is approved. Where-Object and the format commands run locally and add no cloud privilege. Confirm the tenant's exact assignment with Get-ManagementRole.Audit and blast-radius paths
Microsoft Purview portal → Solutions → Audit → affected user and UTC incident window
Microsoft Defender portal → Email & collaboration → Exchange message trace → sender is the affected mailbox
Entra ID → Users → All users → affected user → Applications, then Entra ID → Enterprise apps → All applications → application → Permissions
MailItemsAccessed: a Sync event can mean the entire synchronized folder was exposed. A Bind event can identify individual messages through InternetMessageId. If the evidence cannot bound exposure, assume exposure and escalate.
Complete when
- The first and last suspicious events are identified or explicitly marked unknown.
- The entry method and persistence mechanisms are identified or documented as unresolved.
- Affected identities, messages, files, applications, devices and external recipients are listed.
- Original exports are preserved before remediation.
Remove persistence and restore trust
Remediate only after preserving the relevant evidence. Replace compromised credentials, remove every confirmed persistence mechanism, repair affected content, then prove that the user can return safely.
What to do
Entra ID → Users → All users → user → Reset password, then Authentication methods → remove unknown methods → Require re-register multifactor authentication → Revoke sessions
Mailbox and application cleanup paths
Exchange admin center → Recipients → Mailboxes → user → Mailbox → Email forwarding → Manage email forwarding
Exchange admin center → Recipients → Mailboxes → user → Mailbox delegation → review Read and manage, Send As and Send on behalf
Entra ID → Users → All users → user → Applications → suspicious application → Remove
Entra ID → Enterprise apps → All applications → application → Permissions → revoke the confirmed malicious grant
User consent cannot always be revoked from the Enterprise Applications portal. Use the Microsoft Graph or PowerShell method in the linked Microsoft article when the portal does not offer revocation.
Email and file remediation
Microsoft Defender portal → Explorer → select confirmed malicious messages → take remediation action → Actions & Submissions → Action center → History
Prefer Soft delete when recoverability matters. Hard delete needs stronger permissions and is harder to reverse. Explorer remediation requires Microsoft Defender for Office 365 Plan 2.
OneDrive website → Settings → Restore your OneDrive → select a point before the confirmed malicious activity
Library → Settings → Restore this library. In Teams, open the channel Files tab in SharePoint first.
OneDrive and shared-library restore cover the previous 30 days. Restore only when malicious changes are confirmed, and preserve evidence first.
After containment and evidence capture, run the Compromised Accounts diagnostic for additional findings and troubleshooting guidance. It is optional and is not a substitute for containment, evidence preservation or the investigation steps above. Running it again after remediation can help validate the result.
Access and availability: the documented minimum is any Microsoft 365 administrator role. Use the least privileged admin role already authorized for the incident. The diagnostic is unavailable in GCC High, DoD and Microsoft 365 operated by 21Vianet.
See the official compromised-account diagnostic entry and diagnostic data and privacy details. Microsoft states that customer content such as email, files and chats is not accessed and diagnostic data is removed when the test finishes.
Validate the sign-in
Expected IP, device and application, successful MFA, successful Conditional Access and no unexplained non-interactive activity after revocation.
Validate the service
Test inbound and outbound mail. Remove a restricted-sender block only after the account is secured. Confirm remediated messages and files by spot-checking.
Complete when
- Compromised credentials and authentication methods are replaced.
- All confirmed persistence is removed and validated.
- Malicious email and data changes have a completed remediation result.
- A trusted sign-in succeeds and post-remediation monitoring is clean.
Reduce the chance of recurrence
Prevention is part of incident closure. Turn the confirmed entry method and control gaps into assigned changes, then validate those changes before enforcement.
What to do
Risk policy baseline
User risk High: require risk remediation. Sign-in risk Medium and High: require an approved authentication strength or MFA. Review report-only results first.
Authentication baseline
Prefer passkeys or FIDO2, Windows Hello for Business or certificate-based authentication for high-value identities. Disable legacy authentication.
Entra ID → Conditional Access → Policies → New policy → all users except emergency access → all resources → Conditions → Client apps → Exchange ActiveSync and Other clients → Grant → Block → Report-only
Complete when
- The confirmed entry method has a prevention control or accepted residual risk.
- Report-only impact has been reviewed before enforcement.
- Emergency access remains usable and target users have suitable authentication methods.
- Every improvement has an owner, due date and validation test.
Create a defensible incident record
Evidence should let another responder reconstruct what happened, what changed and why the incident was closed. Keep original exports unchanged and perform analysis on copies.
What to preserve
Entra ID → Monitoring & health → Sign-in logs → set user and UTC filters → Download → export interactive and non-interactive records separately
Microsoft Purview portal → Solutions → Audit → affected identity and UTC incident window → export results
Copyable evidence record
Incident ID: Incident owner: Affected identity: Reported at (UTC): Trigger and source: User verification method and statement: First suspicious event (UTC): Last suspicious event (UTC): Suspected or confirmed entry method: Containment actions, operator and time: Sign-in export filenames and filters: Audit export filenames and filters: Mailbox persistence found: Application consent found: Affected users, messages, files, apps and devices: Remediation actions and validation: Residual risk: Escalation and notification decision: Prevention actions, owners and due dates: Closed by and closed at (UTC):
Complete when
- Original evidence is preserved and analysis was performed on copies.
- Every important action includes the operator, UTC time and result.
- The record states what could not be determined and why.
- Evidence location and access are known to the incident owner.
Assign decisions and close deliberately
One incident commander owns the timeline and closure. Technical work can be delegated, but every decision, handoff and unresolved risk must remain visible in the incident record.
Incident commander / SecOps
Severity, coordination, timeline, blast radius, approvals, communications and closure.
Identity
Account state, sessions, password, MFA, roles, devices, Conditional Access and risk.
Exchange / Messaging
Rules, forwarding, delegates, message trace, malicious email and restricted-sender state.
Application / Cloud security
OAuth grants, enterprise applications, service principals and tenant-wide consent.
Endpoint and data owners
Device isolation, malware response, SharePoint, OneDrive, Teams, Power Platform and restoration.
Legal, privacy and business
Data-exposure assessment, notification duties, fraud response and business-impact decisions.
Escalate immediately when
Closure gate
Complete when
- No critical response action is unowned.
- The affected user and service owner confirm expected access and service behavior.
- Residual risk and notification decisions are recorded.
- The incident commander has approved closure.