UUF Customer feedback: Add a new example with the -Property parameter to Get-EntraGroup.md
Describe the bug UUF customer feedback on https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.entra/get-entragroup?view=entra-powershell: "What kind of properties will it get? Do we have to go into . GroupDetails or #microsoft.graph.group odata types?"
ASK: Can you please add Example 8 using -Property parameter?
To Reproduce N/A
Expected behavior N/A
Debug Output N/A
Module Version N/A
Environment Data N/A
Screenshots N/A
Describe the bug UUF customer feedback on https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.entra/get-entragroup?view=entra-powershell: "What kind of properties will it get? Do we have to go into . GroupDetails or #microsoft.graph.group odata types?"
I can't recall ever seeing PowerShell documentation that includes a full list of the properties on returned objects. That is probably for good reason, as all documentation would become massively unwieldy and harder to maintain. Was the feedback provided in a place where a reply could instruct the guest to run Get-EntraGroup -GroupId $GroupId | Get-Member -Type Property? The Get-Member cmdlet is a good starting point that most people are encouraged to use when they first start working with PowerShell. That habit never stops being useful. Piping an object to Get-Member shows the object's properties and methods.
Side Note: Thankfully, returning rich objects in the module helps us avoid the need to delve into OData unless we want to!
ASK: Can you please add Example 8 using -Property parameter?
An example of using this parameter was probably not included because it is already a fairly commonly used parameter when getting objects (see also the ActiveDirectory and Exchange modules for example). To be fair, though, the Property parameter in this module does not behave in the traditional way, and so an example might actually be helpful.
When using other modules, including -Property <PropertyName[]> typically returns the default properties and the specified property[s]. For example, Get-ADUser Administrator -Properties memberOf will return the default set of AD user properties along with the memberOf property. If we use the Property parameter with Get-EntraGroup, the object returned only includes the specified property (or properties). That surprised me when I first encountered the behavior. I thought it might be a bug until I realized that it is probably intended Graph API behavior to reduce unnecessary calls.
@csmulligan this has been added to the example as visible here: https://learn.microsoft.com/en-us/powershell/module/microsoft.entra/get-entragroup?view=entra-powershell#example-8-get-groups-with-specific-properties
@SamErde the guidance you shared is on point on the existing behavior of -Property parameter in Entra PowerShell cmdlets. Presently there's ongoing work to introduce a new parameter -AppendSelected which will allow users to include the specific properties alongside default properties. Have a look here: https://github.com/microsoftgraph/entra-powershell/pull/1518
I'll now close this issue since the base concern is resolved.