First match wins: the ordered sign-on policy engine
Rules are evaluated in order and the first match wins. That single property causes most policy misconfiguration, because a permissive rule sitting above a restrictive one makes the restrictive one dead code without any warning. The decision trace is how you find that.
After this lesson you can
- Build a three-rule policy and predict, before testing, which rule will win for four different sign-ins.
- Read a per-rule decision trace and state why each non-winning rule did not apply.
- Find a rule made unreachable by ordering, using the trace rather than by reading the policy.
- Explain why first-match-wins was chosen over an aggregate-all-conditions model, and what that costs you.
Exercise
Build a policy with a deliberate ordering bug, then find it with the trace
You need
- A non-production tenant
- Two test accounts, one of them privileged
Steps
- Create a restrictive rule requiring a second factor for accounts holding an administrative role.
- Create a permissive rule above it allowing any sign-in from your office address range with no second factor.
- Sign in as the privileged test account from inside that range. Note that you were not challenged.
- Open the decision trace for that sign-in and identify the winning rule.
- Reorder the rules and repeat. Confirm the trace now names the restrictive rule.
- Write down, in one sentence, the general rule you have just learned about zone-based allowances.
How you know it worked
Two traces for the same account and the same source address, naming different winning rules, and you can explain the difference without looking it up.