You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
csmulligan
changed the title
Add a new example with the -Property parameter to Get-EntraGroup.md
UUF Customer feedback: Add a new example with the -Property parameter to Get-EntraGroup.md
Jan 8, 2025
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.
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
The text was updated successfully, but these errors were encountered: