Get-EntraNamedLocationPolicy
Gets a Microsoft Entra ID named location policy.
Syntax
GetQuery (Default)
Get-EntraNamedLocationPolicy
[-Property <String[]>]
[<CommonParameters>]
GetById
Get-EntraNamedLocationPolicy
-PolicyId <String>
[-Property <String[]>]
[<CommonParameters>]
Description
This cmdlet allows an admin to get the Microsoft Entra ID named location policies.
Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy.
In delegated scenarios with work or school accounts, when acting on another user, the signed-in user must have a supported Microsoft Entra role or custom role with the required permissions. The least privileged roles for this operation are:
- Global Secure Access Administrator (read-only standard properties)
- Security Reader (read-only standard properties)
- Security Administrator (read-only standard properties)
- Global Reader
- Conditional Access Administrator
Parameters
-PolicyId
Specifies the ID of a named location policy in Microsoft Entra ID.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetById
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Property
Specifies properties to be returned.
Parameter properties
Type: | System.String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Select |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.