In this lesson, we cover how to create and apply a Conditional Access policy that enhances security by restricting user logins to approved geographic locations, specifically within the United States. Restricting sign-ins based on location helps reduce the risk of unauthorized access attempts from high-risk or unexpected regions, such as foreign countries commonly associated with malicious activity. This Conditional Access policy will require all devices attempting to login physically be in the U.S. by examining the IP address of each device.
Log into the Entra ID Admin Center.
If you are already in Entra, click on Home in the upper left corner of the screen.
From the Navigation Pane under Protection, select Conditional Access.
Under Manage, select Named locations.
At the top of the page, click + Countries location.
Under Name, type: Approved Countries. Scroll down and select United States and Create at the bottom of the screen
We have now set the known location from which Entra will allow logins. Now, we need to create the conditional access policy that tells Entra to block login attempts from all other countries than the approved countries.
Under Protection, click on Conditional Access and then Create new policy.
Under name, enter CA02: Block Access from Other Countries
Under Users, click on 0 users and groups selected.
Under Include, select All users.
Under Exclude, select Users and groups. Then click on users and groups selected.
Note: If the pop-up window does not open automatically, click 0 users and groups selected
From the pop-up window, select the Emergency Access Account
Click Select at the bottom of the screen
Under Target resources, click No target resources selected
Under Select what this policy applies to, make sure the dropdown menu shows Resources (formerly cloud apps).
Under Include, click on All resources (formerly ‘All cloud apps’).
Click Not configured under Network.
Under Configure, click Yes.
Under Include, click Any network or location.
Click on Exclude then Selected networks and locations
Under Select, click None
In the pop-up window, select Approved Countries
Click Save at the bottom of the screen
Under Conditions, click 1 condition selected
Under Client apps, click Not configured
Click Yes to configure settings
Ensure that the checkboxes next to Browser and Mobile apps and desktop clients are checked
Click Done
Under Filter for devices, click Not Configured
Click Yes to configure the settings
Under Devices matching the rule, click Exclude filtered devices from policy
In the filter rule field, use the dropdown menus to select IsCompliant under Property, Equals under Operator, and True under Value.
At the bottom of the page, click Done
Under Grant, click 0 controls selected
Click Block access
Click Require one of the selected controls
Click Done
You may see a warning note about not locking yourself out. Not to worry - we have excluded the BreakTheGlass account as a failsafe way to access the tenant in the case that your account is ever locked out. It is not necessary to exclude yourself from this policy.
Click on Create at the bottom of the screen.