pnp / PnP

SharePoint / Office 365 Developer Patterns and Practices - Archived older solutions. Please see https://aka.ms/m365pnp for updated guidance
https://aka.ms/m365pnp
Other
1.89k stars 3.31k forks source link

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

Open Tom-CK opened 3 years ago

Tom-CK commented 3 years ago

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:

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.