Muokkaa

Jaa


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

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 topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not 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

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.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Online, Exchange Online Protection

-Identity

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
Type:RecipientIdParameter
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Online, Exchange Online Protection