Most attacks on school accounts start with a sign-in from a country the school has no link to. One rule in Microsoft 365 refuses those sign-ins before a stolen password is any use.
Sign-ins from outside the UK are refused.
Most attacks on school accounts start with a sign-in from abroad.
Define the UK as a location, run the policy in report-only for a week, then switch it on.
Every name, address and value in this guide is an example. Replace them with your own.
What the rule does
Microsoft 365 checks where each sign-in comes from. A Conditional Access policy can say: if the sign-in is not from the United Kingdom, block it. That applies to staff and pupil accounts, and to each Microsoft service: email, Teams, OneDrive, SharePoint and anything else that signs in through Microsoft.
The school keeps two emergency accounts outside the rule, so you can undo a mistake.
What it does not do
- It does not replace two-step sign-in. An attacker using a UK internet connection gets past a location rule. MFA stops them. You need both.
- It only covers sign-ins through Microsoft. A system with its own username and password, such as some MIS or payment platforms, is not covered.
- Location comes from the IP address. Microsoft gets it right for most sign-ins. VPNs and some mobile networks can make a UK teacher look as if they are abroad.
- It acts at sign-in. Someone already signed in may keep working for up to about an hour before Microsoft checks again.
The route
- Create two emergency accounts
Your way back in if a policy goes wrong.
- Tell Microsoft 365 what "the UK" means
A named location with one country in it.
- Build the policy in report-only
It records what it would block and blocks nothing.
- Read a week of results
Find the trips, VPNs and odd services before staff do.
- Switch it on
One setting, then a two-minute test.
The policy blocks no one until step 5. By then the logs have shown you who it will affect, so work through the steps in order and give step 4 its full week.


