Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

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

@Tom-CK

Description

@Tom-CK

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions