AegisAI Perspectives · 203
A timed first-hour table for Microsoft 365 and Google Workspace, with the console path for each step and how long each log is kept.
AegisAI is review-only today, and automated session revocation is planned next.
Or get the Q3 2026 State of the AI Attack report (free, instant download)

For a compromised mailbox, block the account first, then spend the hour removing what the attacker added and saving logs before they age out.1,7,10,12 AegisAI agents read sign-ins and mailbox activity per account and raise one explained finding when behavior stops matching the owner.22
Cut off access first. Then remove what lets the attacker back in. A password reset alone leaves app passwords, app grants, delegates and forwarding in place, and each one keeps the attacker reading the mail.1,10
Microsoft calls this an account takeover.9 This page is the recovery runbook for a compromised mailbox, for the IT admin who has to act alone. The steps for phishing the account sent to colleagues are in how to stop phishing from a compromised internal account. How the takeover happens is in how email account takeover works. What AegisAI reviews is on the account takeover protection page.
A session token is the proof of sign-in a browser or app keeps after the MFA check, so whoever holds it is signed in. An app password is a separate password for an older mail app. An app grant (an OAuth grant) is permission the user gave an outside app to read the mailbox. A delegate is another account allowed to read and send from the mailbox. POP and IMAP are older ways for a mail app to download the whole mailbox. An audit log is the platform's record of who did what.
MITRE ATT&CK has names for four attacker techniques here, Device Registration, Additional Email Delegate Permissions, Email Forwarding Rule and Email Hiding Rules.21 An email hiding rule moves or deletes mail so the owner does not see it. Microsoft lists rules that move mail to Notes, Junk Email or RSS Subscriptions, and odd messages in Sent or Deleted Items, as signs of compromise.1
No source gives minute targets. The two windows below are this page's own ordering, built from the sources. Microsoft says to block access "as soon as possible".1 Access tokens from Microsoft Entra ID (Microsoft's sign-in service) last 1 hour by default.2 Gmail sessions can take up to an hour to end after a cookie reset.11
| Step and why | Microsoft 365 | Google Workspace |
|---|---|---|
| Block sign-in, so no new session starts. | Entra ID > Users > All users > user > Account status > Edit, clear Account enabled2 | Suspend the user. Suspending also resets sign-in cookies and OAuth tokens10 |
| Revoke sessions, so the stolen sign-in cannot be renewed. Access already issued can last up to 1 hour. | User Overview > Revoke sessions2 | Security > Sign-in cookies > Reset11 |
| Reset the password and delete app passwords, which survive a reset. | Authentication methods > Reset password; Multifactor authentication > Manage user settings > Delete all existing app passwords1,3 | Reset password; Security > Application-specific password, revoke each10,11 |
| Save the sign-in and audit logs. Some are kept only 7 days. | Entra ID > Monitoring & health > Sign-in logs, then Audit logs > Download24 | Reporting > Audit and investigation > User log events and Gmail log events13 |
| Step and why | Microsoft 365 | Google Workspace |
|---|---|---|
| Remove sign-in methods and devices the attacker registered. | Entra ID > Users > user > Authentication methods; remove unknown methods or Require re-register MFA; disable registered devices with Get-MgUserRegisteredDevice and Update-MgDevice2,3 | Security > Passkeys & security keys, Remove; 2-Step Verification > Get backup verification codes > Generate new codes11 |
| Check recovery details, the route back in after a reset. | Phone numbers sit under Authentication methods3 | Security > Recovery information, edit email and phone11 |
| Remove delegates. Send as leaves no sign that a delegate sent the message. | Exchange admin center > Recipients > Mailboxes > mailbox > Mailbox delegation4,18 | No console list. Use the Gmail API delegates resource, or the user removes them17 |
| Revoke apps this user granted, which keep access after a reset. | Entra ID > Enterprise apps > app > Permissions > User consent. Revoke with Graph or PowerShell1,5 | Security > Connected applications, remove each10,11 |
| Remove forwarding and inbox rules. | Get-Mailbox Forwarding fields and Get-InboxRule -IncludeHidden1 | Check the user's forwarding and filters through the Gmail API, or sit with the user and open Gmail settings10 |
| List what the account sent and to whom. Then read Sent Items and Deleted Items. | Defender portal > Email & collaboration > Exchange message trace1,8 | Reporting > Email Log Search, Sender set to the user14 |
Revoking a Microsoft app grant does not stop the user from consenting again.5 Google says data access returns once a user signs in to the app again.11 The Gmail settings for automatic forwarding and for POP and IMAP apply by organizational unit, and POP and IMAP changes can take up to 24 hours, so they are for hardening later, not for this hour.15,16 The rule hunting detail is in malicious forwarding rules and how to find them. The tenant-wide app consent search is in how to stop OAuth consent phishing.
If the account is synced from on-premises Active Directory, Microsoft says to reset the password there, twice.1,2 Do not email the new password, because the attacker may still read the mailbox.1 If the user is an admin, Microsoft says to review the admin roles assigned to the account.1 If users sign in to Google through a third-party single sign-on service, Google says to end that session before you reset cookies.11
NIST treats collected incident data as evidence and says to keep it under the organization's preservation and retention rules.19 Some platform logs last only days.
| Log | Kept for | Source |
|---|---|---|
| Entra ID sign-in and audit logs | 7 days (Entra ID Free), 30 days (Entra ID P1 and P2) | 7 |
| Microsoft Purview Audit (Standard) | 180 days | 6 |
| Audit (Premium) default policy, users with an E5 licence or the E5 audit add-on | 1 year for Exchange Online, SharePoint, OneDrive and Entra records | 6 |
| Google User log events, Gmail log events, OAuth Token log events | 6 months | 12 |
| Google Email Log Search | 30 days, metadata only | 12, 14 |
Google admins cannot delete log event data or change how long it is kept.12 The two sources disagree on which licence returns MailItemsAccessed records, the log of which messages were opened. Microsoft says E3 and E5.9 CISA says Premium licences such as E5.18
NIST says to notify affected third parties as regulation, law and contract require.19 If money moved, the FBI says to contact your bank at once, ask for a recall of the funds and file a complaint at ic3.gov.20 The bank steps are in the first hours of a BEC wire transfer.
The rest is common practice, not a sourced rule. List every outside contact the account wrote to after the first suspicious sign-in, phone each on a number you already hold, and tell them not to act on payment changes from that window.
Microsoft says to give the account back after the investigation is complete, by resetting the password and then enabling the account. A mailbox that sent spam may need removing from the Restricted entities page.1 Google says to unsuspend the account, issue a temporary password and turn on 2-Step Verification, with security keys preferred over codes.10 No source sets a pass test for returning a compromised mailbox. Common practice, not a sourced rule: give it back once every row above is done and the logs are saved.
AegisAI is review-only today, and automated session revocation is planned next.23 AegisAI does not revoke sessions today. Every AegisAI finding comes with recommended steps, and your team acts in Entra ID or Google Workspace.22 AegisAI weighs impossible travel, new devices, inbox rule changes and suspicious internal sends together per account.22 The AegisAI page example includes a hidden inbox rule that quietly moves the owner's mail out of sight, so replies about payments never reach them.22 In that example each signal is weak alone. Together, inside 24 minutes, on an account that has never made a rule, they fit a stolen session preparing fraud.22 AegisAI account takeover protection is in early access and runs on the connection you already have, review-only, with no MX change (no change to how mail is routed).22 The Google Workspace side is in account takeover in Google Workspace, the Microsoft side in account takeover protection for Microsoft 365. To see it on your tenant, book a demo.
AegisAI agents read sign-ins and mailbox activity per account and raise one explained finding. AegisAI is review-only today. Every finding comes with recommended steps, and your team acts in Entra ID or Google Workspace.
In this page's ordering, block sign-in, end sessions, reset the password and save the logs in the first 15 minutes. Then remove sign-in methods, delegates, app grants, forwarding and rules, and list what the account sent.
Look at behavior after the sign-in, such as new inbox rules, new forwarding and odd sent mail. AegisAI says MFA stops most of it, but token theft and adversary-in-the-middle kits (phishing pages that sit between the user and the real sign-in page and copy the session) get past it. The full sign table is in how to spot a hijacked mailbox.
It depends on the tool and the access it holds. Ask each vendor which actions it takes without a person. Microsoft and Google both let an admin disable or suspend the account by hand. AegisAI does not revoke sessions today, and automated session revocation is planned next.
In Microsoft 365, run Get-InboxRule with -IncludeHidden and check the mailbox forwarding fields. In Google Workspace, check forwarding through the Gmail API, or ask the user to check Gmail filters and forwarding. The full method is in malicious forwarding rules and how to find them.
Microsoft describes it as an attacker who gains access to a user account and operates as the user. In email, the attacker reads and sends mail as that person.
Affected third parties, as regulation, law and contract require, and law enforcement under your incident plan. If money moved, your bank at once and the FBI at ic3.gov.