question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Get-PnPGroupPermissions: Object reference not set to an instance of an object.

See original GitHub issue

Reporting an Issue

Get-PnPGroupPermissions raises “Object reference not set to an instance of an object” exception when using existing group title as Identity.

Expected behavior

Expecting to get permissions for a group identified by its title.

Actual behavior

Command raises a NullReferenceException when specifying a group name (existing or not). Notice that no exception occurs when passing a group object or its Id… and of course no results either.

Steps to reproduce behavior

Connect-PnPOnline -Url $url -Credentials $credentials
$group = Get-PnPGroup -AssociatedOwnerGroup
Get-PnPGroupPermissions -Identity $group.Title

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

PnP.PowerShell version 1.3.19-nightly (same with 1.2.6-nightly)

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

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:32 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
jansenbecommented, May 3, 2021

Issue has been resolved

1reaction
rom-1commented, May 3, 2021

@jansenbe Tried with v1.5.32-nightly, and the cmdlets “Set-pnpgrouppermissions” and “Get-pnpgrouppersmission” seem to work flawless now. Get-PnPPage -Identity h still throws the error “Object reference not set to an instance of an object.”, but this might be normal as I don’t know the expected output of this command.

2021-05-03_11h29_53

Read more comments on GitHub >

github_iconTop Results From Across the Web

SPO PnP powershell fails with "Object reference not set to ...
The resulting error message is this: Set-PnPWebPermission : Object reference not set to an instance of an object.
Read more >
Connect-PnPOnline : Object reference not set to an ...
I am not able to connect sharepoint site, getting an error like as Connect-PnPOnline : Object reference not set to an instance of...
Read more >
"Object reference not set to an instance of an object" Error ...
Solution: Remove the invalid content database association by following the below steps. Step 1: Get the Web Application GUID. Use the below ...
Read more >
PnP Provisioning Template Object reference not set to ...
The template is trying to find federateddirectoryclaimprovider user for applying permissions to it, but is not able to find this user in ...
Read more >
Get-PnPMicrosoft365Group | PnP PowerShell
Retrieves a specific Microsoft 365 Group based on its object instance ... The owners are available in the "Owners" property of the returned...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found