Remediation
From Azure Portalβ
- In the Azure Portal, navigate to
Microsoft Entra ID
. - Under
Manage
, clickSecurity
. - Under
Protect
, clickConditional Access
. - Under
Manage
, clickNamed locations
. - Within the
Named locations
blade, click onIP ranges location
. - Enter a name for this location setting in the
Name
text box. - Click on the
+
sign. - Add an IP Address Range in CIDR notation inside the text box that appears.
- Click on the
Add
button. - Repeat steps 7 through 9 for each IP Range that needs to be added.
- If the information entered are trusted ranges, select the
Mark as trusted location
check box. - Once finished, click on
Create
.
From PowerShellβ
Create a new trusted IP-based Named location policy:
[System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]]$ipRanges = @() $ipRanges.Add("<first IP range in CIDR notation>") $ipRanges.Add("<second IP range in CIDR notation>") $ipRanges.Add("<third IP range in CIDR notation>") New-MgIdentityConditionalAccessNamedLocation -dataType "#microsoft.graph.ipNamedLocation" -DisplayName "<name of IP Named location policy>" -IsTrusted $true -IpRanges $ipRanges
Set an existing IP-based Named location policy to trusted:
Update-MgIdentityConditionalAccessNamedLocation -PolicyId "<ID of the policy>" -dataType "#microsoft.graph.ipNamedLocation" -IsTrusted $true