Commands › Exchange Online

Test-ApplicationAccessPolicy

Exchange Online ExchangeOnlineManagement Test-*

Test access right of an application to a specific user/mailbox.

Quick start script

# Test-ApplicationAccessPolicy — 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
Test-ApplicationAccessPolicy -Identity <RecipientIdParameter> -AppId <String> | Format-List

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

Syntax

Test-ApplicationAccessPolicy [-Identity] <RecipientIdParameter> -AppId <String>
 [<CommonParameters>]

Parameters (2)

ParameterTypeRequiredWhat it controls
-Identity RecipientIdParameter yes The Identity parameter specifies the recipient to test. You can use any value that uniquely identifies the recipient. For example:
-AppId String yes The Identity parameter specifies the GUID of the app that you want to test. To find the GUID value of an app, run the command Get-App | Format-Table -Auto DisplayName,AppId.

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