Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUF Customer feedback: Add a new example with the -Property parameter to Get-EntraGroup.md #1257

Open
csmulligan opened this issue Jan 8, 2025 · 1 comment
Assignees
Labels

Comments

@csmulligan
Copy link
Contributor

csmulligan commented Jan 8, 2025

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

@csmulligan 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
@SamErde
Copy link
Collaborator

SamErde commented Jan 8, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants