Microsoft 365 account compromised: first steps for admins and management
Key takeaways
- Changing the password is not enough. Attackers keep access through session tokens, their own MFA methods, mailbox rules, forwarding and app permissions. Each of these paths has to be checked and closed.
- Order of work: block sign-in, revoke sessions, reset the password, then check MFA methods, app consents, roles, forwarding and rules. Document first, delete second.
- Logs expire. Entra sign-in logs go back 7 or 30 days depending on licence, the unified audit log usually 180 days. Preserve them immediately.
- In parallel, management decides on notifications: Art. 33 GDPR (as a rule within 72 hours), § 32 of the German BSI Act for NIS2 entities where applicable, and notice to the cyber insurer.
A compromised Microsoft 365 account is a common security incident in mid-sized companies. It usually starts with a phishing email, and a few hours later the mailbox is sending fake invoices to customers. If you only change the password, the attacker is often still in. This article describes the first steps in the order Microsoft recommends for compromised mailboxes, together with the decisions management has to make in the same hours. It does not replace an incident response plan, but it helps you spend the first hours in an orderly way.
How do you recognise a compromised account?
Microsoft lists these signs, among others:
- The mailbox is blocked from sending because it has sent spam.
- Unknown inbox rules that forward email or move it to folders such as RSS Subscriptions, Notes or Junk Email.
- Suspicious messages in Sent Items or Deleted Items.
- Newly added external forwarding or a changed signature.
- Frequent password changes or unexplained account lockouts.
Add to that customers asking about changed bank details, MFA prompts the user did not trigger, and alerts from Microsoft Defender or Entra ID Protection. Take each of these signals seriously, even if the user says they did not click anything.
Which immediate actions are needed, and in what order?
1. Block sign-in and revoke sessions
Microsoft recommends disabling the account during the investigation. In the Microsoft Entra admin center under Entra ID > Users, open the user, clear Account enabled under Account status, then select Revoke sessions on the overview page. This invalidates refresh tokens. According to Microsoft, access tokens already issued can remain valid until they expire, typically after about an hour, unless the application supports continuous access evaluation. If the account is synchronised from on-premises Active Directory, disable it there, because the account status comes from on-premises AD. Also disable the user’s registered devices if a device may be affected.
2. Reset the password
Use a new, strong password and do not send it to the user by email, as the attacker may be reading the mailbox. If the account is synchronised from on-premises Active Directory, Microsoft advises resetting the password there, twice. Existing app passwords are not revoked automatically by a reset and must be deleted.
3. Check MFA methods
Attackers often register their own authenticator app or phone number. Under Entra ID > Users > [user] > Authentication methods, remove all unknown methods. Require re-register MFA deletes phone numbers, authenticator apps and software tokens, and the user registers again, ideally with IT present.
4. Check app consents and roles
An OAuth app that the user allowed to access their mailbox or files keeps that access after a password change. Check the permissions the user has granted under Enterprise applications and revoke anything unknown. Also check whether administrator roles in Entra ID, Exchange, Purview or Azure have been assigned to the account.
5. Check forwarding, rules and delegations
In Exchange Online PowerShell, these commands show forwarding settings and all inbox rules, including hidden ones:
Get-Mailbox -Identity <UPN> | Format-List Forwarding*Address,DeliverTo*
Get-InboxRule -Mailbox <UPN> -IncludeHidden | Format-List Name,Enabled,RedirectTo,Forward*,Identity
Get-MailboxPermission -Identity <UPN> | Where-Object { $_.IsInherited -eq $false }
The third command shows who has full access to the mailbox. Also check Send As rights and folder permissions. Export the results before you delete anything. A deleted rule is also deleted evidence.
6. Review sent items and message trace
Which emails did the account send during the period in question, to whom and with what content? Message trace in the Exchange admin center also shows emails the attacker deleted after sending, although only with metadata such as sender, recipient, subject and time. If the mailbox was blocked for sending spam, lift the block under Restricted entities once the clean-up is complete.
How do you establish the scope?
The central question for management and data protection is: what could the attacker access, and did they read or exfiltrate data? Three sources help:
- Entra sign-in logs: IP addresses, locations, times, client apps, success or failure, interactive and non-interactive. With Microsoft Entra ID Free they are kept for 7 days, with P1 or P2 for 30 days. Upgrading afterwards does not bring back lost days.
- Unified audit log in Microsoft Purview: inbox rules, mailbox access, file downloads from SharePoint and OneDrive, role changes. Audit (Standard) keeps records for 180 days. For users with Microsoft 365 E5 or an equivalent add-on, Audit (Premium) keeps Entra, Exchange, SharePoint and OneDrive records for one year.
- MailItemsAccessed: this mailbox audit record shows which emails were read or synchronised. According to Microsoft it is enabled by default for users with Office 365 or Microsoft 365 E3/E5. With other licences, check whether the records are present.
If sign-in logs flow into Log Analytics or Microsoft Sentinel, this query gives a quick overview of where the sign-ins came from:
SigninLogs
| where TimeGenerated > ago(30d)
| where UserPrincipalName =~ "<UPN>"
| summarize SignIns = count(), Successful = countif(ResultType == "0")
by IPAddress, Country = tostring(LocationDetails.countryOrRegion), AppDisplayName
| order by SignIns desc
Check non-interactive sign-ins in the AADNonInteractiveUserSignInLogs table as well, because stolen tokens often show up there. Then search for the same IP addresses on other accounts. A compromised account is rarely the only one.
Who do you need to inform?
These decisions are made by management, not IT, and they run in parallel with the clean-up:
- Data protection authority: Under Art. 33 GDPR, the controller notifies a personal data breach without undue delay and, where feasible, within 72 hours of becoming aware of it, unless it is unlikely to result in a risk to the individuals concerned. A mailbox almost always contains personal data. Where a high risk is likely, Art. 34 GDPR also requires informing the individuals. Involve your data protection officer immediately.
- Cyber insurer: Many policies require prompt notification and agreement before external responders are engaged. Check your obligations. Our article on cyber insurance requirements describes what insurers typically ask for.
- BSI if NIS2 applies: In Germany, essential and important entities report a significant security incident under § 32 BSIG with an early warning within 24 hours, a notification within 72 hours and a final report no later than one month after the 72-hour notification. Whether an incident is significant should be assessed and documented against your incident response planning.
- Business partners: If the mailbox sent fake invoices or payment requests, warn the recipients quickly and through a second channel, for example by phone.
This is not legal advice. Whether and what you need to report should be clarified with your legal advisers and your data protection officer.
How do you preserve evidence without delaying the clean-up?
Cleaning up and preserving evidence are compatible if you work in the right order. Export sign-in and audit logs for the affected period immediately as CSV or JSON, before retention removes them. Save the output of the PowerShell commands above with date and operator. Do not delete the account or the mailbox. Keep a simple log of who noticed what, when, and what they did. If a forensic investigation or a police report is likely, talk to the engaged responder before making far-reaching changes.
So that the next incident does not go the same way, the steps in this article belong in your incident response plan, with names, phone numbers and roles.
Next step
If you suspect an incident right now, our suspected cyberattack page lists the direct contact routes. After the clean-up, it is worth looking at root causes: missing phishing-resistant MFA, legacy authentication still allowed, unrestricted user consent for apps. Our Microsoft 365 hardening closes these gaps.
Frequently asked questions
Is it enough to change the password and enable MFA?
No. Existing sessions, MFA methods registered by the attacker, app consents, forwarding and inbox rules are not affected by that. The account is only back under control once all of these paths have been checked.
How far back do the logs go?
Entra sign-in logs: 7 days with Entra ID Free and 30 days with P1 or P2. The unified audit log keeps records for 180 days with Audit (Standard), and for one year with Audit (Premium) for E5-licensed users across Entra, Exchange, SharePoint and OneDrive. If you want to look back further, you have to export logs in advance, for example to Microsoft Sentinel.
Do we have to report every compromised account to the data protection authority?
Not automatically. Art. 33 GDPR provides an exception where the breach is unlikely to result in a risk to the individuals. You must document that assessment, however, and for a mailbox containing customer or HR data it will rarely be clear-cut.
Should we delete the account and create a new one?
No. A deleted account makes the investigation harder, because the user’s mailbox and files are deleted with it. Disable, clean up, investigate and then re-enable is the approach Microsoft describes.
Book an introductory call