PnP icon indicating copy to clipboard operation
PnP copied to clipboard

Remove-PNPGroup results in "Object reference not set to an instance of an object"

Open Tom-CK opened this issue 3 years ago • 0 comments

Running

Remove-PNPGroup -Identity [a 100% valid group name] -Force

results in an exception "Object reference not set to an instance of an object". image

I validated the name of the group. Running Get-PNPGroup with the same groupname is working well.

My environment:

  • PNP.Powershell 1.5.0
  • SharePoint Online Modern Teamsite

I use

Connect-PNPOnline -Url ... ClientId .... -ClientSecret ....

to connect. ClientId and Secret ist valid (working with other commands). The app is registered with "scope="...../sitecollection" Right="FullControl".

When I connect using my account (-UseWebLogin) the command works well.

Tom-CK avatar Apr 18 '21 08:04 Tom-CK