Test-ApplicationAccessPolicy
This cmdlet is available only in the cloud-based service.
Use the Test-ApplicationAccessPolicy cmdlet to test access right of an application to a specific user/mailbox.
For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.
Syntax
Default (Default)
Test-ApplicationAccessPolicy
[-Identity] <RecipientIdParameter>
-AppId <String>
[<CommonParameters>]
Description
This feature applies only to apps connecting to the Microsoft Graph API for Outlook resources.
You need to be assigned permissions before you can run this cmdlet. Although this article lists all parameters for the cmdlet, you might not have access to some parameters if they aren't included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.
Examples
Example 1
Test-ApplicationAccessPolicy -Identity "Engineering Staff" -AppID 3dbc2ae1-7198-45ed-9f9f-d86ba3ec35b5
This example tests access to the specified app for the group "Engineering Staff".
Example 2
Test-ApplicationAccessPolicy -Identity RandomUser9911@AppPolicyTest2.com -AppId e7e4dbfc-046-4074-9b3b-2ae8f144f59b
This example tests access to the user RandomUser9911@AppPolicyTest2.com for the specified app.
Parameters
-AppId
Applicable: Exchange Online, Exchange Online Protection
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.
You can specify multiple app GUID values separated by commas.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Identity
Applicable: Exchange Online, Exchange Online Protection
The Identity parameter specifies the recipient to test. You can use any value that uniquely identifies the recipient. For example:
- Name
- Distinguished name (DN)
- Display name
- Email address
- GUID
Parameter properties
Type: | RecipientIdParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
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.