Blog/How-to guides

How to Secure a Microsoft 365 Tenant: A Step-by-Step Guide

A practical order of work for hardening Microsoft 365: admin roles, conditional access, legacy authentication, mailbox rules, sharing defaults and logging.

CyberWatch AI11 November 2026 · 10 min read
A person at a desk using a desktop computer with a spreadsheet and a settings page open

Most compromised Microsoft 365 tenants are not broken into. Someone signs in with a correct password, often through a protocol that cannot ask for a second factor, creates a mailbox rule so the victim never sees the replies, and then waits for an invoice conversation worth hijacking. No malware, no exploit, nothing for an endpoint product to find.

That is the attack this guide is built around. The work below is ordered so that each step is safe to do before the next one, which matters because the most common self-inflicted outage in Microsoft 365 is an administrator enforcing a policy that locks out every account including their own.

Before you start

You need the Global Administrator role, and you need to know which licenses you hold, because that determines which path you take at step three. Conditional access requires a Microsoft Entra ID P1 plan, usually present in Business Premium and in E3 or E5. Without it, security defaults provide a simpler all-or-nothing version of the same idea. Risk-based policies and Privileged Identity Management need P2.

Give yourself a change window, tell your help desk what is changing, and work in report-only mode wherever it is offered. Keep a running note of what you changed and when, because the first user complaint will arrive before you have finished.

Step 1: Create break-glass accounts

Do this first, and do it even if you intend to change nothing else.

  1. In the Microsoft Entra admin center, create two cloud-only accounts that are not tied to any person and do not use your custom domain's normal naming pattern.
  2. Assign the Global Administrator role permanently to both, not through Privileged Identity Management, since the point is that they work when other systems do not.
  3. Set a long unique passphrase on each. Print the credentials, seal them in separate envelopes, and store them in physically secure locations with controlled access. Do not keep them in the password manager you access through the tenant you are protecting.
  4. Exclude both accounts from every conditional access policy you create later. This is the specific thing that prevents a lockout.
  5. Create an alert on sign-ins from either account, so legitimate use is noticed and illegitimate use is noticed faster.
  6. Put a calendar reminder to test one of them every quarter and rotate the passphrase afterwards.

Step 2: Reduce and separate administrative access

Open Roles and administrators and list the holders of Global Administrator. In most small tenants the number should be two or three plus the break-glass accounts. Everything else should move to a narrower role: Exchange Administrator, User Administrator, Security Reader, Helpdesk Administrator.

Then separate the function from the person:

  • Administrative work happens in a dedicated admin account with no mailbox and no licenses it does not need, so a phished daily-driver account does not hand over the tenant.
  • Remove administrative roles from accounts that receive external email. This single change removes most of the value of phishing an administrator.
  • If you have P2, enable Privileged Identity Management and make the roles eligible rather than active, with approval and justification for activation.
  • Review guest accounts and service principals while you are here. Look at Enterprise applications and check which applications hold broad delegated or application permissions, since a consented application is a standing credential. Our article on consent phishing explains how those grants are obtained.

Step 3: Require multi-factor authentication for everyone

Microsoft now enforces MFA for sign-ins to administrative portals, which narrows but does not close the gap. You want every user, every application, every sign-in.

If you do not have conditional access: enable security defaults in the Entra admin center under Properties. It requires MFA registration for all users, prompts when needed, blocks legacy authentication, and always requires MFA for administrative roles. It is not configurable, and for a tenant of a few dozen people that is usually a feature.

If you do have conditional access: turn security defaults off and build the policies in step four instead. Do not try to run both.

Either way, deal with the legacy per-user MFA settings. If accounts were historically set to "enforced" through the per-user MFA page, migrate them so your conditional access policy is the single source of truth, otherwise you will spend weeks debugging prompts that come from a system you forgot about.

Choose stronger methods while you are deciding. Authenticator app with number matching beats SMS codes. Passkeys and hardware security keys beat both, and are the only methods that hold up against a real-time proxy phishing page, as covered in passkeys versus phishing. If you enforce MFA without upgrading the method, expect attackers to fall back on repeated push approvals until somebody taps accept.

Step 4: Build a conditional access baseline

Create each policy in report-only mode, leave it for a few days, read the conditional access insights workbook, then switch it to on. Exclude your break-glass accounts from all of them.

  1. Require MFA for all users. All cloud apps, all users, exclude break-glass. Use authentication strengths if you want to mandate phishing-resistant methods for a subset.
  2. Block legacy authentication. Target "Exchange ActiveSync clients" and "Other clients" and set the grant control to block. Check report-only results before enforcing, because this is the policy most likely to break a forgotten printer, scanner or line-of-business application.
  3. Require MFA for administrative roles on every sign-in, with no trusted-location exclusion. Administrative access from an unmanaged device is worth blocking outright if you can.
  4. Require a compliant or hybrid-joined device for administrators, if you manage devices. This is the strongest single restriction available to most tenants.
  5. Set sign-in frequency and disable persistent browser sessions for administrators, using session controls, so a stolen token has a short life. Continuous access evaluation handles the rest for supported clients.
  6. Block or restrict access from countries you never operate in, as a named location policy. It is a blunt control that cuts a lot of automated noise.
  7. If you have P2, require MFA for medium and high sign-in risk and require a password change for high user risk.

Document each policy's purpose in its name, for example "CA01 - Require MFA - All users - exclude break-glass", because in a year you will not remember why CA07 exists.

Step 5: Close off legacy authentication properly

The conditional access policy is the front door. These are the side doors.

  • Confirm Basic authentication is off in Exchange Online. It has been retired, and confirming beats assuming, particularly in tenants that held an exception.
  • Disable SMTP AUTH at the organization level and then enable it only on the specific mailboxes that genuinely need to send from a device or application. SMTP AUTH is the protocol most often left on, and it is enough for an attacker with a password to send mail as a user.
  • Turn off POP3 and IMAP4 per mailbox unless something documented requires them.
  • Find what is still using legacy protocols before you break it: filter the Entra sign-in logs by client app for legacy categories and look at what appears. Expect a multifunction printer, an old scan-to-email configuration, a backup tool and a CRM integration. Move each to modern authentication or to a dedicated mailbox with a scoped exception, and set a date to remove the exception.

Step 6: Audit mailbox rules and forwarding

Mailbox rules are the signature of a business email compromise, because they are how an attacker stays hidden inside a conversation. Do the detection and the prevention in that order.

Find what exists now. Connect to Exchange Online PowerShell and enumerate rules across mailboxes with Get-InboxRule. What you are looking for:

  • Rules that forward or redirect to an external address, including addresses that look like a colleague's name at a free mail provider.
  • Rules that move or copy mail into rarely opened folders such as RSS Subscriptions, Conversation History, Junk, Notes or a newly created folder with a blank or single-character name.
  • Rules that delete messages containing keywords like invoice, payment, remittance, bank, wire, IBAN, swift or the name of your finance system.
  • Rules with no name or a single character name, which is a common attacker habit.
  • Rules created at an odd hour or shortly after an unfamiliar sign-in.

Check mailbox-level forwarding separately from rules, since ForwardingSmtpAddress on the mailbox object is a different setting from an inbox rule and is easy to miss. Also check delegate and full-access permissions on executive and finance mailboxes.

Then prevent it. Block automatic external forwarding in the outbound spam filter policy, which stops the most damaging category outright. Confirm mailbox auditing is on, create an alert policy for new inbox rule creation and for forwarding configuration changes, and route those alerts somewhere a human reads. If you find something, the Microsoft guidance on responding to a compromised email account is the right runbook, and business email compromise explains what the attacker is usually working toward.

Step 7: Fix sharing defaults in SharePoint and OneDrive

The goal is to make the safe option the automatic one.

  1. Set the organization-level external sharing level to the least permissive setting that still supports how you work. "New and existing guests", which requires sign-in, is a reasonable landing point for most organizations. "Anyone", which creates links that work without authentication, should be the exception.
  2. Set the default sharing link type to "People in your organization" rather than "Anyone with the link". Most accidental exposure comes from the default, not from a deliberate choice.
  3. If you allow Anyone links, set an expiry and restrict their permission to view rather than edit.
  4. Override at the site level for sites holding sensitive material, since site settings can be stricter than the tenant.
  5. Limit guest resharing and restrict sharing to specific domains if your collaboration is with a known set of partners.
  6. Review the sharing reports to see what is already shared externally. Most administrators find at least one surprise. Our article on cloud storage phishing links explains why attackers like your sharing features so much.

Step 8: Turn on logging you can actually search

An investigation is only as good as what was recorded before it started.

  • Confirm audit logging is enabled and check which audit tier you have, because retention differs between the standard and premium offerings and the default window is shorter than most investigations need.
  • Verify mailbox auditing is on for the mailboxes you care about and that mailbox read actions are being recorded, since "did they open it" is the question regulators ask.
  • Run a test search in the audit log now, for something you did five minutes ago. Finding out that search works during an incident is too late.
  • Export Entra sign-in and audit logs to a SIEM, a Log Analytics workspace or a storage account, because the in-portal retention is measured in days for the free tier.
  • Create alert policies for the handful of things that matter: new inbox rules, forwarding changes, elevation of privilege, mass file download or deletion, mailbox permission grants, and sign-ins by break-glass accounts.
  • Write down where the logs are and who has access, and put that in your incident response plan.

Step 9: Email authentication and anti-phishing

Publish SPF, DKIM and DMARC for every domain you own, including the ones you do not send from, and move DMARC to an enforcing policy once reporting looks clean. Configure the anti-phishing policy with impersonation protection for your executives and your own domains, and enable mailbox intelligence. If your licensing includes Safe Links and Safe Attachments, turn them on for all users and for Teams and Office applications as well as mail. None of this stops a determined attacker, and all of it removes a large volume of straightforward attempts. The wider picture is in our guide to Microsoft 365 phishing.

Got a suspicious message in a tenant you just hardened? Paste the message or link into CyberWatch AI Scan for a free check.

Step 10: Verify, then put it on a schedule

Test rather than assume. Sign in as a pilot user and confirm the MFA prompt appears. Try an IMAP or SMTP AUTH connection and confirm it is refused. Confirm a break-glass account still signs in. Share a file and check which link type is offered by default. Search the audit log for your own test activity.

Then set a recurring half hour each month: review administrative role membership, check for new inbox rules and forwarding, look at risky sign-ins, review new enterprise applications and their consents, check external sharing reports, and confirm log export is still running. Tenants drift, and drift is where the next compromise lives. For the organizational layer around all of this, see our small business cybersecurity guide.

Frequently asked questions

What order should I do this in?

Create a break-glass admin account first, then reduce the number of global administrators, then require MFA for everyone, then block legacy authentication. Mailbox rule auditing, sharing defaults and logging come next. Doing conditional access before the break-glass account is how people lock themselves out of their own tenant.

Do I need expensive licensing to do this properly?

The main controls are available broadly. Security defaults give small tenants MFA with no extra licensing, conditional access needs a Microsoft Entra ID P1 plan, and risk-based policies and Privileged Identity Management need P2. Audit logging, mailbox rule review and sharing settings are standard.

What is legacy authentication and why does it matter so much?

Older protocols that cannot present a second factor, so a correct username and password alone grants access. Any tenant that still permits them has an MFA policy with a hole in it. Basic authentication has been retired in Exchange Online, but SMTP AUTH and per-protocol settings still need checking.

How do I find malicious inbox rules?

Use Get-InboxRule across mailboxes in Exchange Online PowerShell and look for rules that forward or redirect externally, move mail to obscure folders such as RSS Subscriptions or Conversation History, or delete messages matching words like invoice, payment or bank. Then set an alert policy so new rule creation is flagged going forward.

Should external sharing be turned off completely?

Rarely. Turning it off tends to push file sharing onto personal accounts you cannot see. Set the default link type to people inside your organization, require sign-in for external recipients rather than anonymous links, add expiry to any anonymous links you do allow, and review the sharing reports.

How long does Microsoft 365 keep audit logs?

Audit Standard retains most activity for a limited default period and Audit Premium extends it, with longer retention available through retention policies. Entra sign-in and audit logs have their own shorter default window. If you need longer, export to a SIEM or storage account, and configure that before you need it, not after.

What is a break-glass account?

A cloud-only global administrator account excluded from conditional access policies, with a long unique passphrase stored offline in sealed physical storage, used only when normal admin access fails. Create two, monitor their sign-ins with an alert, and test them on a schedule.

How do I check whether this all worked?

Run conditional access policies in report-only mode first and read the insights workbook, then test with a pilot account: attempt a legacy protocol connection, confirm MFA prompts appear, confirm your break-glass account still signs in, and verify audit search returns the test activity.

Sources

  1. Microsoft 365 for business security best practices, Microsoft Learn
  2. Manage emergency access admin accounts, Microsoft Learn
  3. Require MFA for all users with Conditional Access, Microsoft Learn
  4. Block legacy authentication with Conditional Access, Microsoft Learn
  5. Disable Basic authentication in Exchange Online, Microsoft Learn
  6. Enable or disable SMTP AUTH in Exchange Online, Microsoft Learn
  7. Control external email forwarding and fix 5.7.520 errors, Microsoft Learn
  8. Get-InboxRule (ExchangePowerShell), Microsoft Learn
  9. Manage sharing settings for SharePoint and OneDrive in Microsoft 365, Microsoft Learn
  10. Learn about auditing solutions in Microsoft Purview, Microsoft Learn
Share this article
LinkedIn WhatsApp X
For organizations

Your people get these messages at work too.

CyberWatch AI sends your staff realistic practice attacks, trains the gaps it finds, and shows management exactly where the organization stands.