An API that connects multiple Microsoft services, enabling data access and automation across platforms
Our lovely AI assistant almost got it right this time. The root cause is correct - since the AllowExternalSenders property is not returned by default, you must specifically request it, and the way to do that in PowerShell is via the -Property parameter. You still have to add it to the select statement afterwards though, and the same applies to any additional properties you might want to include:
Get-MgGroup -GroupId xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -Property allowExternalSenders | select allowExternalSenders
Get-MgGroup -GroupId xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -Property displayName,allowExternalSenders | select displayNameallowExternalSenders
Alternatively, you can use the "beta" module/cmdlets, as they return all properties by default.