Skip to content
Copy as Markdown

Respond to a compromised account

ScopeTenantRoleL1 Read to view · L1 Read/Write to act

Incident response for a compromised Microsoft 365 account runs in three moves in Octiga: stop the attacker signing in, close what they opened while they were in, then shut the route they came in by. The first sign comes from Octiga’s graded events, alerts and account risks; the user remedies, Mail flow and Applications screens handle the containment; and a handful of baselines close the route. A stolen password becomes business email compromise through an inbox rule or a forward that sends mail out of the organisation, so the mailbox gets the same attention as the sign-in.

Octiga grades every Microsoft 365 audit event it collects for a tenant (sign-ins, admin actions, mailbox rule changes and the rest) as Critical, Danger, Warning or Info when it arrives, and resolves where it happened from: the country, the region it falls in if you’ve defined one and, where Octiga can tell, the network operator behind the IP address. On the tenant’s Monitoring screen, the Needs attention lens lists the events graded warning or worse with their actor, country and description, and the filter drawer narrows them by Severity, Country, User, Region, IP, ASN or Type. An event’s detail sheet pins its location on a map (when it has one) and lists Actor, Country, Region, ASN and IP, so a sign-in from a country or network the user has no reason to be on stands out. See Events.

Every event graded warning or worse raises an alert, and alerts reach you three ways (Alerts):

  • In the app, on the Alerts screen, which lists every alert across every tenant you manage. With an L1 role, it lists only the alerts for the tenants assigned to you.
  • By email, as an hourly digest to the people on your alert recipients list, at the severities each of them has chosen (Alert recipients).
  • As a PSA ticket, when a connected PSA is mapped for that severity and client (PSA integrations).

Auto-block acts before anyone reads the alert. When it’s on for a user, Octiga blocks their sign-in as soon as it grades one of their sign-ins Critical or Danger: the effect is the same as Block sign-in, the alert’s Sign-in row reads Blocked (via auto-block), and everyone on your alert recipients list is emailed straight away, whatever severities they receive, with the subject [ALERT] User account auto-blocked and the tenant’s name. If Octiga couldn’t complete the block, the same people get an email with the same subject, so check the user’s sign-in whenever one arrives and block it yourself if the account isn’t blocked. You turn Auto-block on per user in User management, or for every user in a tenant from Tenant settings; see User remedies.

Before anything has happened, Account risks points at the accounts an attacker hopes to find: MFA missing, where a stolen or guessed password is enough to sign in; Admin with mailbox, a licensed admin that also receives email; Dormant admin, an admin account unused for months; and Shared mailbox sign-in, a login shared by several people with no audit trail of who sent what. Each finding carries a severity and its fix.

Two more screens flag what an attacker leaves behind. Mail flow flags suspicious inbox rules and forwards out of the organisation, and its Mailboxes tab counts them for the whole tenant as Flagged items, External forwards and Critical rules. Applications lists the apps consented in the tenant (apart from Microsoft’s own built-in apps) and grades each by its riskiest finding, such as a Critical permission or an Unverified publisher.

Each of these remedies needs L1 Read/Write and has the same effect wherever you start it (User remedies). Block sign-in and Reset password are offered from the alert’s or event’s User actions, from the user in User management and from the mailbox’s side sheet in Mail flow; Revoke sessions is on the user in User management.

  1. Block sign-in.

    On the alert or event, select User actions, then Block user: this blocks the actor straight away, without asking first, and ends their sessions. In User management, open the user’s menu (⋮), select Block sign-in and confirm. Either way the Microsoft 365 account is disabled and every session it has open ends, so the attacker is signed out everywhere as well as stopped from signing in again.

  2. Check the sessions ended.

    If Microsoft disabled the account but couldn’t end its sessions, Octiga says Sign-in blocked, but active sessions couldn’t be revoked, and existing sessions keep working until they expire. Select Revoke sessions in the user’s menu, or User actions in their side sheet, and confirm with Revoke.

  3. Reset the password.

    Select Reset password… in the user’s menu, or Reset password in the alert’s User actions or the mailbox sheet’s footer. Octiga shows the new password before applying it: copy it with the copy button, or select Reveal password to read it, then select Reset password. Share it with the user offline; it isn’t shown again after the dialog closes. The user chooses a new password at their next sign-in, and every device or browser they were signed in on is signed out.

If several accounts are involved, tick them in User management and use the batch bar: Block sign-in and Revoke sessions run on every selected user and ask you to confirm with a count of the users they’ll change. Reset password… runs one user at a time.

Leave the account blocked until the mailbox and the tenant’s apps are clean; letting the user back in is the first step under After the incident.

A password reset ends the attacker’s sessions, not what they set up while they had them. Both screens here need L1 Read/Write to change anything; with L1 Read you can review everything.

In Mail flow, open the mailbox from the Mailboxes tab. The list starts with mailboxes that have a flagged external forward, then the worst flagged inbox rule, and the All time filter narrows it to mailboxes whose flagged forwards or inbox rules changed in the Last 24 hours or Last 7 days, which is where a fresh compromise shows. The mailbox’s side sheet has three tabs to work through:

  1. Mail forwarding.

    Each forward is tagged Internal or External, with when it was last modified. Select the delete icon at the end of a forward the user didn’t set up, then Delete to confirm. The forward is removed from Exchange straight away and can’t be undone; if it turns out to be needed, the user or an admin can recreate it.

  2. Inbox rules.

    The user’s own rules are listed as cards, each showing what it does, its severity and its type. Turn off the enable switch on any rule the user didn’t create, such as one that forwards, redirects, moves or deletes mail. A disabled rule can’t act on mail, so it stops counting as a live finding, and the switch saves as soon as you change it.

  3. Remote access.

    Enabled IMAP, POP3 and SMTP authentication are critical and start flagged. Turn off any the mailbox doesn’t need: these legacy protocols can’t do multi-factor authentication, so a password alone gets in through them. A mailbox that reads Controlled by Global SMTP Policy follows the organisation-wide setting, so there’s nothing to turn off there.

If the compromised account held an admin role, check the Transport rules tab as well. Rules apply to mail across the whole organisation, and the All time filter lists the ones modified recently; a rule the client didn’t create can be turned off with its Enabled switch or removed with Delete rule from its menu, and View JSON shows its full definition first.

In Applications, the tenant’s apps are listed worst risk first, each graded by its riskiest finding. Look for an app you don’t recognise, one with a Critical permission or Broad write access, or one whose publisher Microsoft hasn’t verified (a verified publisher shows a tick). On an app’s Permissions tab, each application permission shows the date it was granted, and each delegated grant is titled All users for an admin consent or 1 user for a consent one user gave; hover over the title to see who. Start with any grant the compromised user consented to.

  1. Disable the app.

    Turn off its Enabled switch, or open it and select Disable app, then confirm. The app can no longer sign in or get new tokens, though a token it already holds keeps working until it expires. Its permissions are kept, so an app that turns out to be legitimate can be turned back on as it was.

  2. Revoke the grant.

    On the Permissions tab, select Revoke in the grant’s header and confirm. Every permission on the grant goes at once; for an All users grant, that’s for every user in the tenant. To take away a single application permission instead, hover over it and select Remove.

  3. Finish in Microsoft Entra if you need to.

    Open in Entra opens the app’s enterprise application page in the customer’s directory.

The route the attacker used is one these baselines close. Add them to the tenant (Adding a baseline), or put them in a scheme and deploy it to every tenant you manage (Deploying a scheme).

  • Enforce MFA — requires multi-factor authentication for every sign-in, not only admin sign-ins, so a stolen or guessed password is no longer enough. It’s also the fix for the MFA missing account risk.
  • Block Legacy Authentication — blocks sign-ins over legacy authentication protocols, which can’t do multi-factor authentication.
  • Block Device Code Flow — blocks device code phishing, where the victim completes MFA on Microsoft’s genuine sign-in page while the tokens go to the attacker. This one is set up in Microsoft Entra rather than remediated, so its exclusions stay in place; its page has the steps.
  • Mail Auto Forwarding — turns off automatic forwarding to external addresses for the whole tenant, whether it’s set up by an inbox rule, a mailbox forwarding address or an admin-set redirect.
  • Automatic Forwarding - Block — a mail flow rule that bounces automatically forwarded mail to external addresses back to the sender. You can use both forwarding baselines, and a block from either one is enough.
  • Unified Audit Log — keeps Microsoft’s Unified Audit Log on. With it off, Microsoft isn’t recording the events Octiga collects, and the beacon beside Event monitoring on the tenant’s Monitoring screen shows the Audit log off state (hover it for the reason).

The three Conditional Access baselines need Entra ID P1 or P2 on the tenant (Licence requirements). For the MFA, legacy authentication and forwarding baselines, switch on Auto so a setting that’s changed back is remediated without anyone checking; each baseline’s page says what to exclude or check before you enforce it. Auto acts only while the tenant’s Allow auto-remediation setting is on (Remediation).

Turn on Auto-block for the tenant’s users as well, so the next sign-in graded Critical or Danger is blocked without waiting for someone to read the alert: per user in User management, or for every user with Turn on for all users in Tenant settings, which needs L2 Support. A lockout needs no one’s approval, so let the tenant’s users know before you turn it on.

  1. Let the user back in.

    In User management, choose the Blocked lens, open the user’s menu (⋮), select Unblock and confirm. Unblocking leaves their Auto-block setting as it is, so if it’s on, a later sign-in graded Critical or Danger can block them again.

  2. Recheck the tenant’s account risks.

    In Account risks, select Recheck from Page actions (⋮) to re-evaluate every account now rather than waiting for the next scheduled pass. Work through what’s left with Resolve, and dismiss a finding that doesn’t apply; a finding that recurs, or changes severity, resurfaces even if an earlier occurrence was dismissed. The user’s History tab keeps every remediation, dismissal and un-dismissal, with who did it and when.

  3. Clear the events you’ve dealt with.

    On the tenant’s Monitoring screen, dismiss the incident’s events so Needs attention shows only what’s still open; select several rows and Dismiss them together. Dismissing needs L2 Support, and each dismissal is recorded in the event’s History. For the record, an event’s Technical details tab loads Microsoft’s original audit record with Show…, which you can copy.

  4. Allow a trusted source, if one caused the noise.

    If the sign-in turned out to be the client’s own office or a network operator you trust, an event rule for that country, region, network or IP address usually stops events from it raising alerts in future. It affects only events that arrive after it’s saved, and creating one needs L2 Support. A rule is for places you trust, not the attacker’s: an allowed event gets the grade its activity alone deserves, usually Info, which keeps it out of Needs attention. See Event rules.

  5. Report it.

    Run a security report for the dates of the incident from New report in Security reports. It covers Security configuration, Threat monitoring and User accounts, opens in Octiga and downloads as a PDF to share with the client.