powershell icon indicating copy to clipboard operation
powershell copied to clipboard

[BUG] Get-PnPMicrosoft365Group - ResourceBehaviorOptions empty for non-Team connected M365 Groups

Open Nibushi opened this issue 4 years ago • 2 comments

Reporting an Issue or Missing Feature

I am not sure whether this is a bug or by design.

When running Get-PnPMicrosoft365Group for Teams connected Groups the ResourceBehaviorOptions are populated to show things like: ResourceBehaviorOptions : {HideGroupInOutlook, SubscribeMembersToCalendarEventsDisabled, WelcomeEmailDisabled}

Running the same command against non-Teams connected M365 Groups these properties are not shown: ResourceBehaviorOptions : {}

Expected behavior

Regardless of whether the Group is connected to a Team it should return the ResourceBehaviorOptions. These properties are shown in the Admin UI regardless of whether the Group is connected to a Team or not.

Looking to see these properties: image

Actual behavior

Non-Team connected Groups do not return the properties which are visible in the UI

Steps to reproduce behavior

$group = Get-PnPMicrosoft365Group -Identity "Group Name/GUID" $group | fl *

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

v1.8.0

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

  • [ x ] Windows

Nibushi avatar Dec 07 '21 11:12 Nibushi

Not sure if its a fault with the underlying MS Graph API call to /Groups but ResourceBehaviourOptions is not populated at all.

image

When you access a Team you go the Graph API endpoint /teams and this does return ResourceBehaviourOptions. Unfortunately we can only access Team enabled Groups with this endpoint.

Probably one to raise with Microsoft as it looks to be a bug in the underlying Graph API.

LeonArmston avatar Dec 09 '21 11:12 LeonArmston

Thanks @LeonArmston for the investigation. Yeah, looks like an issue with Graph API. Going to close this issue and would suggest that you raise this with Microsoft

gautamdsheth avatar Dec 14 '21 13:12 gautamdsheth