Commands › Exchange Online

Get-ClientAccessRule

Exchange Online ExchangeOnlineManagement Get-*

> [!NOTE] > Client access rules were deprecated for all Exchange Online organizations in September 2025. For more information, see Update on Client Access Rules Deprecation in Exchange Online. This cmdlet is functional only in Exchange Server 2019 or later. Use the Get-ClientAccessRule cmdlet to view client access rules. Client access rules help you control access to your organization based on the properties of the connection.

Quick start script

# Get-ClientAccessRule — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-ClientAccessRule | Format-List

# 3. Export for evidence / drift tracking
Get-ClientAccessRule | Export-Clixml .\ClientAccessRule-$(Get-Date -Format yyyyMMdd).xml

Syntax

Get-ClientAccessRule [[-Identity] <ClientAccessRuleIdParameter>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-Identity ClientAccessRuleIdParameter The Identity parameter specifies the client access rule that you want to view. You can use any value that uniquely identifies the client access rule. For example:
-Confirm SwitchParameter This parameter is reserved for internal Microsoft use.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-WhatIf SwitchParameter This parameter is reserved for internal Microsoft use.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.