[BUG] Get-PnPGroupPermissions: Object reference not set to an instance of an object.
See original GitHub issueReporting 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:
- Created 3 years ago
- Comments:32 (16 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Issue has been resolved
@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.