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.

Before you act / Licensing and access

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.

Available Limited Add-on
Microsoft 365 Business Standard incident-response licensing matrix
CapabilityBusiness StandardPractical boundaryMicrosoft source
Entra sign-in and audit logsLimitedPortal 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 StandardAvailable after activationBusiness 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 auditingAvailableOn by default for user, delegate and administrator mailbox operations. Investigate through Purview Audit.Mailbox auditing
MailItemsAccessed audit eventsAdd-onBusiness 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 traceAvailableExchange Online keeps trace data for 90 days; each query can cover at most 10 days.Message trace FAQ
Rules, forwarding and delegatesAvailableExchange admin center and Exchange Online PowerShell are included. RBAC still controls who may inspect or change them.Exchange Online
Disable, reset and revoke sessionsAvailableCloud-account disable, cloud-password reset, authentication-method cleanup and refresh-token revocation are available. Hybrid writeback is separate.Revoke access
Identity Protection riskLimitedBasic risk visibility is limited. Risk details, history, Graph risk reporting and automatic risk remediation require Entra ID P2.Identity Protection
Conditional AccessAdd-onStandard policies require Entra ID P1. User-risk and sign-in-risk policies require P2.Plan Conditional Access
Threat Explorer and automated email remediationAdd-onThreat Explorer, campaigns and automated investigation and response require Defender for Office 365 Plan 2.Defender for Office 365
Purview eDiscovery cases, search and purgeAdd-onDo 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 writebackAdd-onWriting 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 responseAdd-onBusiness Standard does not include Intune or Defender for Business. Escalate device actions to the licensed endpoint owner.Plan comparison
Business Standard audit preflight

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.

Minimum role, delegated permission and licensing boundary for every technical action in this SOP
Action or commandMinimum portal or RBAC roleGraph or Exchange permissionBusiness Standard boundaryMicrosoft source
Read user profile, groups, devices and assigned rolesDirectory 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 usersSecurity Reader.IdentityRiskyUser.Read.All.Limited; full detail requires P2.List risky users
Confirm compromised or dismiss riskPortal: Security Operator. Graph: Security Administrator.IdentityRiskyUser.ReadWrite.All.Add-on; requires P2.Remediate risk
View and export sign-in logsReports 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:$falseUser 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-MgUserSignInSessionPassword 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 passwordPassword 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-registrationAuthentication 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 deviceCloud Device Administrator.Device.ReadWrite.All for Graph.Available; not the same as endpoint isolation.Emergency access revocation
Isolate an endpoint or approve a responseDefender 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 principalCloud 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-AdminAuditLogConfigPurview 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-UnifiedAuditLogPurview 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 traceCustom Exchange role group with the Message Tracking management role.Exchange RBAC; no Graph scope.Available for 90 days.Exchange RBAC
Review and revoke application consentDirectory 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-ExchangeOnlineThe 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-ListRecipient-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-ListView-Only Recipients.Exchange RBAC. Format-List adds no permission.Available.Exchange roles
Get-MailboxPermission + Where-Object + Format-TableView-Only Recipients.Exchange RBAC. Where-Object and Format-Table run locally.Available.Get-MailboxPermission
Get-RecipientPermission; Get-Mailbox ... GrantSendOnBehalfToView-Only Recipients.Exchange RBAC; no Graph scope.Available.Get-RecipientPermission
Remove malicious rules, forwarding or delegatesRecipient-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 AIRUnified 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 entitiesUnified 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 OneDriveUser 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 librarySite owner or SharePoint Administrator.SharePoint site permissions.Available for the previous 30 days.Restore a library
Configure phishing-resistant authentication methodsAuthentication 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 policyConditional Access Administrator.Policy.ReadWrite.ConditionalAccess.Add-on; P1 for standard policy, P2 for risk conditions.Block legacy authentication
Run the Compromised Accounts self-help diagnosticAny 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.

Phase 01 / Triggers

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

Portal path

Microsoft Entra admin center → Entra ID → Protection → Identity Protection → Risky users → affected user

Decision: if the user denies the activity, cannot be reached, or telemetry indicates unauthorized access, continue immediately to containment. If the activity is recognized, document why it is safe before closing the alert.
Microsoft Entra risky users report showing the investigation list and available user risk details
Use the risky users report to connect the trigger to Microsoft detections. Source: Microsoft Learn.

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.
Phase 02 / Triage

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.

User path

Microsoft Entra admin center → Entra ID → Users → All users → affected user → Overview, Assigned roles, Groups, Devices, Authentication methods and Sign-in logs

Decision: use the fastest safe containment for active harm. Capture only the minimum volatile evidence first. Do not delay disabling an actively abused account to build a perfect evidence package.
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.
Phase 03 / Containment

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

Click path

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 sessions
Connect-MgGraph -Scopes "User.EnableDisableAccount.All","User.Read.All","User.RevokeSessions.All"
Update-MgUser -UserId "<UPN>" -AccountEnabled:$false
Revoke-MgUserSignInSession -UserId "<UPN>"
Action access: use User Administrator for a supported non-admin identity and Privileged Authentication Administrator for an administrator target, subject to role hierarchy. The delegated Graph session needs the three scopes shown. Verify the update permission and session-revocation permission.
Token reality: access tokens commonly remain valid for about one hour unless Continuous Access Evaluation shortens the window. Application-issued cookies may require separate deprovisioning.

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.
Phase 04 / Investigation

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

Sign-in path

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.

Microsoft Entra sign-in logs with the non-interactive user sign-ins view selected
Review interactive and non-interactive activity separately. Expand grouped non-interactive rows before drawing conclusions. Source: Microsoft Learn.
Microsoft Entra sign-in Authentication Details tab showing authentication steps and results
Authentication Details explains which factors were required, attempted and satisfied. Preserve correlation, request, session and token identifiers when available. Source: Microsoft Learn.
Mailbox persistence commands Inbox rules, including hidden rules
Get-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
Action access: connect with 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
Mailbox changes

Microsoft Purview portal → Solutions → Audit → affected user and UTC incident window

Outbound email

Microsoft Defender portal → Email & collaboration → Exchange message trace → sender is the affected mailbox

Application consent

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.

Microsoft application consent incident response workflow from detection through investigation and remediation
Application consent can be user-specific or tenant-wide and can outlive a password reset. Source: Microsoft Learn.
Do not infer safety from missing data: retention, licensing, aggregation and audit configuration affect what is visible. Absence of an event does not prove that access did not occur.

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.
Phase 05 / 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

Password and MFA

Entra ID → Users → All users → user → Reset password, then Authentication methods → remove unknown methods → Require re-register multifactor authentication → Revoke sessions

Microsoft Entra user Authentication methods page with administrative actions for multifactor authentication
Compare every registered method with the verified user. Requiring re-registration removes several existing methods, so confirm recovery access first. Source: Microsoft Learn.
Mailbox and application cleanup paths
Forwarding

Exchange admin center → Recipients → Mailboxes → user → Mailbox → Email forwarding → Manage email forwarding

Delegates

Exchange admin center → Recipients → Mailboxes → user → Mailbox delegation → review Read and manage, Send As and Send on behalf

User applications

Entra ID → Users → All users → user → Applications → suspicious application → Remove

Tenant application permissions

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
Malicious email

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

OneDrive website → Settings → Restore your OneDrive → select a point before the confirmed malicious activity

SharePoint or Teams library

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.

Optional Microsoft validation: Compromised Accounts diagnostic

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.

Recovery decision: do not re-enable the account until password, MFA, rules, forwarding, delegates, roles, applications and devices are clean. For a genuine compromise, the Identity Protection result should be Remediated, not merely Dismissed.

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.
Phase 06 / Prevention

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.

Legacy authentication policy

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

Plan the migration: legacy Identity Protection risk policies retire on 1 October 2026. Build user-risk and sign-in-risk controls in Conditional Access. Full risk capabilities require Microsoft Entra ID P2 or Microsoft Entra Suite.

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.
Phase 07 / Evidence

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

Sign-in export

Entra ID → Monitoring & health → Sign-in logs → set user and UTC filters → Download → export interactive and non-interactive records separately

Mailbox and Microsoft 365 audit

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):
Retention and licensing: default Microsoft Purview audit retention is generally 180 days. Some audit detail and longer retention require premium licensing. Apply filters before download because sign-in exports are limited per file.

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.
Phase 08 / Owners and escalation

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

Authority boundary: responders should not make legal-notification, law-enforcement, financial-payment or emergency-access decisions without the designated business authority.

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.