Table of Contents

Get-PnPEntraIDAppSitePermission

SYNOPSIS

Required Permissions

  • Microsoft Graph API: Sites.FullControl.All

Returns Entra ID App permissions for a site.

SYNTAX

All Permissions

Get-PnPEntraIDAppSitePermission [-PermissionId <String>] [-Site <SitePipeBind>] [-Connection <PnPConnection>]

By Permission Id

Get-PnPEntraIDAppSitePermission -PermissionId <String> [-Site <SitePipeBind>] [-Connection <PnPConnection>]

By App Display Name or App Id

Get-PnPEntraIDAppSitePermission -AppIdentity <String> [-Site <SitePipeBind>] [-Connection <PnPConnection>]

DESCRIPTION

This cmdlet returns app permissions for either the current or a given site.

EXAMPLES

EXAMPLE 1

Get-PnPEntraIDAppSitePermission

Returns the apps that have permissions for the currently connected site. Note that if PermissionId is not specified then the Roles property is not populated. This is a current API limitation.

EXAMPLE 2

Get-PnPEntraIDAppSitePermission -Site https://contoso.sharepoint.com/sites/projects

Returns the apps that have permissions for the site specified. Note that you are required to have the SharePoint Administrator role in your tenant to be able to use this command.

EXAMPLE 3

Get-PnPEntraIDAppSitePermission -PermissionId TowaS50fG1zLnNwLmV4dHwxYxNmI0OTI1

Returns the specific app permission details for the given permission id for the current site.

EXAMPLE 4

Get-PnPEntraIDAppSitePermission -AppIdentity "Test App"

Returns the specific app permission details for the app with the provided name.

EXAMPLE 5

Get-PnPEntraIDAppSitePermission -AppIdentity "14effc36-dc8b-4f68-8919-f6beb7d847b3"

Returns the specific app permission details for the app with the provided Id.

PARAMETERS

-AppIdentity

You can specify either the Display Name or the AppId to specifically retrieve the permission for.

Type: String
Parameter Sets: By App Display Name or App Id

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: PnPConnection
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionId

If specified the permission with that id specified will be retrieved.

Type: String
Parameter Sets: By Permission Id

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site

Optional url of a site to retrieve the permissions for. Defaults to the current site.

Type: SitePipeBind
Parameter Sets: (All)

Required: True
Position: Named
Default value: Currently connected site
Accept pipeline input: False
Accept wildcard characters: False

Microsoft 365 Patterns and Practices