Skip to content

[BUG] - Revoke-PnPAzureADAppSitePermission - Not Working #5127

@robcaretta-thrivent

Description

@robcaretta-thrivent

Reporting an Issue or Missing Feature

The cmdlet Revoke-PnPAzureADAppSitePermission is not working as expected.

Expected behavior

The cmdlet removes the permissions.

Actual behavior

My account is a SharePoint Tenant Admin, and also a site collection admin for the site I am attempting to revoke permissions on. The cmdlet seems to do nothing. Does not remove the permission grant and does not throw an error. After running the cmdlet I re-check the permission and there is no change. -Verbose switch also doesn't provide any additional context.

Steps to reproduce behavior

$permissionId = Get-PnPAzureADAppSitePermission -Site $locals.siteURL -AppIdentity $locals.entraAppID
if($null -ne $permissionId) {
$permissions = Get-PnPAzureADAppSitePermission -Site $locals.siteURL -PermissionId $(($permissionId).Id)
$permissions
}
else {
Write-Host "No existing app permissions were found."
}

Revoke-PnPAzureADAppSitePermission -PermissionId $permissionId.Id

Image

What is the version of the Cmdlet module you are running?

3.1.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions