Saltar al contenido principal
    Skip to main content

    My business email has been hacked: what to do in the first hours

    Microsoft 365 and Outlook: block the account, end sessions, delete forwarding and turn on MFA. What to check in the logs and when to tell the AEPD (72 hours).

    By Filip Balik, co-founder · Updated on 28 October 2026

    If your business email has been hacked, changing the password is not enough. In the first hour: block the account, end all its sessions, delete any forwarding and rules you didn't create, and turn on two-step verification. Then check the logs to see what the attacker did, warn your contacts through another channel and, if personal data was at stake, consider notifying Spain's data protection authority within 72 hours.

    How do I know my business email has been hacked?

    Microsoft lists these signs that a Microsoft 365 email account may be compromised. One is enough:

    • The mailbox is blocked from sending email.
    • Emails are missing or have been deleted for no reason.
    • There are inbox rules you didn't create: they forward mail to unknown addresses or move it to folders nobody looks at, such as Notes, Junk Email or RSS Subscriptions.
    • Sent Items or Deleted Items contain messages you didn't write, along the lines of "I'm stuck in London, send money".
    • Your entry in the company address book has changed: name, phone number or postcode.
    • Frequent password changes or unexplained account lockouts.
    • Someone has recently added forwarding to an external address.
    • Odd email signatures, such as a fake banking signature.

    In that guide, Microsoft focuses on business email compromise (BEC), a very common type of attack: the intruder uses your mailbox to write to people inside and outside the company, who trust you. That's why getting back in is only the start. You have to close every door the attacker left open.

    What do I do in the first hour?

    These are the steps in Microsoft's response guide for Microsoft 365, in order. An administrator carries them out; if an IT provider runs your systems, call them now.

    1. Disable the account or, if you can't, reset the password. Microsoft prefers disabling it until the investigation is finished. If you reset the password, make it strong, don't reuse any of the last five, and don't email it to the user: the attacker may still be reading the mailbox. If the account syncs from an on-premises Active Directory, reset it there, and do it twice.
    2. End all sessions. In the Microsoft Entra admin center: Entra ID > Users > All users, select the user, under Account status select Edit, clear Account enabled and save. Then, on the user's Overview page, select Revoke sessions. From then on the user can't get new tokens.
    3. Remove any verification methods you don't recognise. The attacker may have registered their own device as a second factor.
    4. Review the apps the user has granted permissions to and remove any that shouldn't be there.
    5. Review the account's administrator roles and remove any that aren't needed.
    6. Delete forwarding and rules. Check mailbox forwarding (SMTP forwarding, which an admin sets up) and every inbox rule, hidden ones included. In Exchange Online PowerShell they show up with Get-InboxRule -Mailbox <mailbox> -IncludeHidden.
    7. Turn on multifactor authentication (MFA) for that account. Microsoft calls it essential for accounts with admin privileges.

    At a glance:

    Step What it shuts Where
    Disable the account or reset the password New sign-ins with the stolen password Microsoft 365 or Entra admin center
    Revoke sessions Sessions that are already open Entra, Revoke sessions button
    Review MFA methods A second factor added by the attacker Entra, the user's authentication methods
    Review apps with permissions An app that was given access to the account Entra, applications
    Replace app passwords Programs connected with an app password The user deletes them and creates new ones
    Delete rules and forwarding Copies of your mail going outside Outlook or Exchange Online PowerShell

    Why isn't changing the password enough?

    Because the attacker may have left other doors that stay open after the change:

    • Open sessions. Access tokens issued by Microsoft Entra last one hour by default. Once you revoke sessions the user can't get new tokens, but in apps that use access tokens they only lose access when the current one expires. The sooner you revoke, the sooner it closes.
    • App passwords. Microsoft warns that they aren't revoked automatically when you reset the password. The user has to delete them and create new ones.
    • Mailbox rules. They live on the server, not on the computer. Microsoft warns that reinstalling Outlook, or even giving the person a new computer, doesn't help: as soon as Outlook connects, the rules and forms sync back from the cloud. Some malicious rules are built to launch a program and install malware that steals the password again. If you find one, Microsoft says to clean every device where the user has used Outlook before letting them sign back in. Up-to-date versions of Outlook block this trick by default.
    • A second factor or an app belonging to the attacker, as in steps 3 and 4.

    What did the attacker do with my email?

    This question drives everything else, including whether you notify the authority. Microsoft recommends reviewing the logs from the start of the suspicious activity until you finish the clean-up:

    • Microsoft Entra sign-in logs: IP address, location, time and whether the attempt succeeded. Watch the clock: Microsoft Entra ID Free keeps them for seven days, and P1 or P2 for 30 days. Upgrading your licence later doesn't bring back what has already gone. Check them on day one.
    • Audit log in the Microsoft Defender portal: Audit (Standard) keeps records for 180 days. It used to be 90; the change applies to records generated from 17 October 2023. Microsoft advises searching from just before the first sign of trouble and not filtering by activity in the first search.
    • Mailbox auditing: on by default in every organisation, it records, among other things, sent messages, deletions and changes to inbox rules. The MailItemsAccessed action records which emails were accessed; according to Microsoft, it's on by default for users with an Office 365 or Microsoft 365 E3 or E5 licence.
    • Message trace and the Sent Items folder, to find out who the attacker wrote to from your account.

    Microsoft's advice is to be cautious: with a compromised account, assume more mail was exposed than the attacker's traces show. Syncs by desktop Outlook are logged per folder, and the whole synced folder is treated as compromised. If any sync came from the same connection the attacker used (same IP address and protocol), Microsoft says to assume they took the entire mailbox.

    Why won't Microsoft let me send email?

    If the attacker used the mailbox to send spam or went over the sending limits, Microsoft restricts it: it can still receive, but not send, and it appears on the Restricted entities page in the Microsoft Defender portal. Every attempt to send bounces back with the error "550 5.1.8 Access denied, bad outbound sender". The "User restricted from sending email" alert policy notifies global administrators by default.

    To unblock it, an administrator goes to the Defender portal, Email & collaboration > Review > Restricted entities, selects the user and chooses Unblock. Microsoft says to do this only after regaining control of the account, and the wizard itself offers to reset the password and enable MFA if you haven't yet. Restrictions are normally lifted within an hour, and within 24 hours at most.

    Do I have to tell the data protection authority?

    It depends on what was in the mailbox. The GDPR (in Spain, RGPD) defines a personal data breach as "toda violación de la seguridad que ocasione la destrucción, pérdida o alteración accidental o ilícita de datos personales transmitidos, conservados o tratados de otra forma, o la comunicación o acceso no autorizados a dichos datos" (a breach of security leading to the accidental or unlawful destruction, loss or alteration of, or unauthorised disclosure of or access to, personal data transmitted, stored or otherwise processed; Article 4.12). A business mailbox is usually full of data about customers, staff and suppliers, so unauthorised access can be one.

    In Spain the authority is the Spanish Data Protection Agency (Agencia Española de Protección de Datos, AEPD). Here is what the GDPR and the AEPD's breach guide (June 2021 version) say:

    1. Deadline. The controller notifies the supervisory authority "sin dilación indebida y, de ser posible, a más tardar 72 horas después de que haya tenido constancia de ella" (without undue delay and, where feasible, not later than 72 hours after having become aware of it; Article 33.1). The 72 hours include weekends and public holidays. If you notify later, you must give the reasons for the delay.
    2. When you don't need to. When the breach is unlikely to result in a risk to people's rights and freedoms. The AEPD has a tool, Asesora Brecha, that helps you decide, although, as the agency itself says, it doesn't replace your decision.
    3. In stages. If you don't know everything after 72 hours, the AEPD accepts an initial notification with what you have and an update within 30 working days of the initial one.
    4. How. Through the breach form on the AEPD's electronic office (sede electrónica), which needs a digital certificate or Cl@ve. Companies, which must deal with the Spanish administration electronically, have to notify electronically, preferably with that form.
    5. Always keep a record. Whether or not you notify, Article 33.5 requires you to document the breach: the facts, its effects and the action you took.
    6. Tell the people affected only when a high risk to them is likely (Article 34). You don't need to if, after the breach, you take measures that ensure the high risk can no longer materialise; the AEPD gives the example of immediately revoking or blocking the compromised credentials. But if the attacker has already taken data, changing the password doesn't undo that. For this decision the AEPD has another tool, Comunica-Brecha RGPD.

    Spain's data protection act (LOPDGDD) classes failing to notify the authority as a serious infringement (Article 73.r), and notifying incompletely, late or defectively (Article 74.m) or failing to document the breach (Article 74.n) as minor ones. Those articles haven't changed since 2018. The AEPD points out that notifying doesn't necessarily lead to a fine: doing it properly and on time is evidence of diligence.

    If the mailbox held data you process on behalf of your clients, you are acting as a data processor (encargado del tratamiento). Your duty is to tell each affected client "sin dilación indebida" (without undue delay; Article 33.2), and it's the client who decides whether to notify the AEPD, unless your contract makes that your job.

    What do I tell my clients and suppliers?

    Assume the attacker may have written to them from your address.

    1. Find out who they wrote to, in Sent Items and in message trace.
    2. Warn them by phone or from another account, not from the compromised mailbox while it's still not clean.
    3. Tell them what to ignore: any urgent payment request or change of bank details they received from your address in those days. Ask them to confirm by calling a number they already had, not the one in the email.

    To get help or report it:

    • 017. INCIBE's cybersecurity helpline (Línea de Ayuda en Ciberseguridad; INCIBE is Spain's national cybersecurity institute) is free and confidential, also serves businesses and professionals, and is open from 8 am to 11 pm, 365 days a year. It also works through WhatsApp (900 116 117, saved in your contacts first) and Telegram (@INCIBE017).
    • INCIBE-CERT. Businesses can report the incident by email or through the contact form, with a detailed description and their contact details. If there's a fraudulent email, include it with its headers and attachments. If Spain's National Security Framework (ENS) applies to you, also check what it asks for on incidents.
    • Police report. INCIBE reminds you that you can file a police report (denuncia) at any police station: Policía Nacional, Guardia Civil, Ertzaintza, Mossos d'Esquadra or Policía Foral.

    Notifying the AEPD is not a police report: according to its guide, it isn't the channel for complaints against anyone. If you want the attacker pursued, report it separately.

    What if it's an Outlook.com or Gmail account?

    The steps above are for business email on Microsoft 365, where an administrator acts. With a personal account, you do it yourself. At a glance:

    Microsoft 365 Outlook.com Gmail Google Workspace
    Who acts Administrator You You Administrator
    Cut off access Disable the account and revoke sessions Change or reset the password Change the password Suspend the user
    What to check Rules, forwarding, MFA, apps and roles Connected accounts, forwarding and automatic replies Delegation, forwarding, filters and IMAP or POP Forwarding, filters, app passwords and OAuth tokens
    Where to see activity Entra logs and audit log Recent activity Security activity Audit logs
    • Outlook.com. Microsoft says to run a full antivirus scan before changing your password. If you can't sign in, reset it. Because someone else had access, Microsoft resets some account settings: check connected accounts, forwarding and automatic replies. Recent activity shows when and where your account was accessed.
    • Gmail. Change your password, open the review of security-related activity and mark anything you don't recognise as not you. In Gmail, look for changes to delegation, automatic forwarding, filters and IMAP or POP access.
    • Google Workspace. The administrator suspends the user, which resets their sign-in cookies and OAuth tokens; then resets the password, revokes the OAuth 2.0 tokens, removes app passwords and checks forwarding and filters. Google recommends two-step verification with security keys.

    How do I stop it happening again?

    1. MFA for everyone. Microsoft offers security defaults at no extra cost: every user must register for MFA, administrators are always asked for it, and legacy authentication is blocked, meaning older programs such as Office 2010 or anything using IMAP, SMTP or POP3. Microsoft says most compromising sign-in attempts today come through legacy authentication, which also bypasses MFA. By its own figures, MFA plus that block stops more than 99.9% of common identity attacks. Since 29 July 2024 there's no longer a 14-day grace period to register for MFA. You turn them on in Entra ID > Overview > Properties > Manage security defaults. First check that no printer or program sends email over those older protocols.
    2. External forwarding explicitly turned off. In the outbound spam policy, the default option, Automatic - System-controlled, has meant forwarding off for new organisations since 2021, but in some older ones it can still allow it. Microsoft recommends choosing On or Off rather than leaving it on automatic. With Off, rules that forward outside the company stop working and the sender gets error 5.7.520.
    3. Outlook kept up to date, which blocks by default rules and forms that launch programs.
    4. Two emergency access accounts with the global administrator role, which Microsoft recommends keeping for when normal accounts can't be used or every administrator is locked out.
    5. A written plan: who disables the account, who gets called, and who decides within 72 hours whether to notify the AEPD. The AEPD's guide asks organisations to build breach handling into their processes.

    At Quantum Nova we review the configuration of your cloud and your domain as part of our cybersecurity audit, without subcontracting and at a fixed price agreed after a free 2 to 5 day assessment. If you use AWS, Azure or Google Cloud, our cloud security audit guide covers what to check.

    Frequently asked questions

    Does changing the password lock the attacker out?

    Not completely. Open sessions stay alive until you revoke them, and Microsoft Entra access tokens last one hour by default. App passwords aren't revoked when you reset the password, and forwarding rules stay in the mailbox until you delete them.

    How long do I have to notify the AEPD?

    Up to 72 hours from when you become aware of the breach, weekends and public holidays included, unless it's unlikely to pose a risk to people. If you don't have all the information yet, you can send an initial notification and complete it within 30 working days.

    Does reinstalling Outlook or changing computer fix it?

    No. Mailbox rules and forms live on the server and sync back as soon as Outlook connects. You have to delete them in the mailbox and, if any of them launched a program, clean every device where the user has used Outlook.

    Why can't I send email after the hack?

    Because Microsoft restricts mailboxes that send spam or exceed the sending limits. An administrator unblocks it under Restricted entities in the Defender portal, after securing the account. It usually takes an hour and 24 hours at most.

    Where do I report that my email was hacked?

    At any police station of the Policía Nacional, the Guardia Civil or the relevant regional police. You can also report the incident to INCIBE-CERT and ask the 017 helpline for guidance. Notifying the AEPD doesn't count as a police report.

    Sources

    This article explains the law and published court criteria as of the update date. It is not a substitute for advice from a lawyer on a specific case.

    We write each article with the help of AI and check every fact against primary sources before publishing it. If you spot a mistake, write to info@quantumnovaagency.com and we will correct it.

    Terms in this article

    Book your free diagnosis.

    Emailinfo@quantumnovaagency.comWhatsApp+34 678 428 710
    LocationTorrevieja (Alicante) · all of Spain

    What happens next

    1. 1We reply within 24 hours.
    2. 2We have a call to look at your case.
    3. 3We send you a proposal with a fixed price.

    By submitting this form you agree to your data being handled under the Privacy Policy.