The property you need is hideFromAddressLists
. It is only returned when you specifically request it via the $select
statement, and only when querying individual groups (i.e. /groups/{groupId}
), and not the generic LIST endpoint the above cmdlet is using.
As a workaround, this should do:
Get-MgGroup -Filter "groupTypes/any(x:x eq 'Unified')" -All -Property Id, DisplayName, GroupTypes, ResourceProvisioningOptions, CreatedDateTime, Mail, Description, Owners, MailEnabled, Visibility | select Id, DisplayName, GroupTypes, ResourceProvisioningOptions, CreatedDateTime, Mail, Description, Owners, MailEnabled, Visibility, @{n="hideFromAddressLists";e={(Get-MgGroup -GroupId $_.Id -Property hideFromAddressLists).hideFromAddressLists}}