Build the rule in report-only mode. It records each sign-in it would have blocked and blocks none.
The settings
| Section | Set it to |
|---|---|
| Name | [School name] - United Kingdom Only |
| Users: Include | All users |
| Users: Exclude | Users and groups › Emergency Access Accounts |
| Target resources | All resources (formerly 'All cloud apps') |
| Network | Configure: Yes. Include: Any network or location. Exclude: Selected networks and locations › your United Kingdom location |
| Conditions | Leave as they are |
| Grant | Block access |
| Session | Nothing |
| Enable policy | Report-only |
Select Create.
How to read it
The policy reads backwards. It blocks "everywhere", then removes the UK from "everywhere", which leaves sign-ins from outside the UK. Microsoft recommends this pattern because a location it cannot recognise ends up blocked.
When you save a blocking policy, the portal may offer to exclude your own account so you cannot lock yourself out. Decline. Your admin account is the one an attacker most wants, and the emergency accounts already cover a lockout. Reopen Users › Exclude afterwards and confirm only the emergency group is listed.
Test it without waiting
- Open What if
On the Policies page select What if.
- Pick a member of staff and a country
Choose any user, set the country to France and select What if.
- Read the result
Your policy should be listed as one that would apply. Change the country to United Kingdom and it should move to the list that would not.


