3. Sign-in risk policy
The sign-in risk policy monitors each login for suspicious activity. If it detects unusual behaviour (e.g. a risky IP address or abnormal device state), it can require the user to change their password. You can configure different risk levels, like low, medium, or high and apply controls like MFA depending on the severity. This ensures that accounts showing potential compromise are secured before granting full access.
4. User-risk policy
The user-risk policy is without doubt one of the policies we believe every Azure admin should have. A user-risk policy monitors sign-in activity, including IP addresses, device state, and unusual behaviour. When risk levels hit medium or high, depending on how you set it up in your environment, you can trigger actions like requiring MFA, forcing a password reset, or restricting access.
Best Practices:
- Start in Report-only mode: Evaluate the impact of your policy before enforcing changes.
- Keep policies focused: Avoid overly complex or broad policies; manage each scenario separately.
- Separate internal staff and contractors: Contractors often require stricter controls, as HR or third parties may not always notify IT when someone leaves.
- Avoid combining multiple scenarios: This keeps policies clear and easier to manage.
5. Block device code flow
Device code flow authentication allows users to authenticate by entering a code from a terminal prompt into a browser, often used with tools like:
Connect-MgGraph -DeviceCode.
While this method can be convenient, it poses a security risk because it may bypass some of the controls enforced on managed devices.
Blocking device code flow helps prevent unauthorised access, especially in environments where strict authentication controls are required.
This policy is rarely implemented - even in large organisations - despite the risk it presents. For most organisations, it’s best practice to block device code flow entirely, or only allow it for specific users who have a legitimate need for this type of access.
6. Block access from outside approved locations
Another important conditional access policy is to block access to the tenant from locations we don’t trust or approve. You can, for example, try to block access from all locations where your organisation isn’t operating.
- Example 1: Let’s say you are a small business based in the UK. All your users are within the UK, and you don’t want access from any locations outside that country, then you can use this policy.
- Example 2: Imagine an SMB with a few satellite offices around Europe. You could choose the countries where you have a presence and only allow connections from those locations. You can always trust the office locations that you have around the world; in that case, the list of public IP addresses for those locations would be considered trusted.