Is your feature request related to a problem? Please describe the problem.
The way how the use of the -Property parameter changes the results is confusing.
Get-MgGroupMember -GroupId "…"
Returns and object with a property id
Get-MgGroupMember -GroupId "…" -Property "city"
Returns and object with a dictionary AdditionalProperties with the key city, but property id does not exist.
Get-MgGroupMember -GroupId "…" -Property "id","city"
Returns and object with a property id and a dictionary AdditionalProperties with the key city.
My question is:
- When
id is treated as a standard and immediate property of the returned user object (rather than an additional property), why is it left blank, when you manually add properties to the request and don't include id?
- Why is there a distinction between immediate properties (
id) and additional properties (everything not id)?
Looking at the HTTPS request/response, this makes no sense because all properties are on the same JSON level and there is no distinction between standard and additional properties:
GET https://graph.microsoft.com/v1.0/groups/<GUID>/members?$select=id,department
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects(id,department)",
"value": [
{
"@odata.type": "#microsoft.graph.user",
"id": "xxx",
"department": "Sales"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "yyy",
"department": "Finance"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "zzz",
"department": "Management"
}
]
}
Coming from Active Directory, this behaviour is also unexpected, where the -Properties attribute add the selected properties directly to the user object.
Describe the solution you'd like.
A request Get-MgGroupMember -GroupId "…" -Property "id","city" should return an object with a property id and another property department.
Additional context?
No response
Is your feature request related to a problem? Please describe the problem.
The way how the use of the
-Propertyparameter changes the results is confusing.Get-MgGroupMember -GroupId "…"Returns and object with a property
idGet-MgGroupMember -GroupId "…" -Property "city"Returns and object with a dictionary
AdditionalPropertieswith the keycity, but propertyiddoes not exist.Get-MgGroupMember -GroupId "…" -Property "id","city"Returns and object with a property
idand a dictionaryAdditionalPropertieswith the keycity.My question is:
idis treated as a standard and immediate property of the returned user object (rather than an additional property), why is it left blank, when you manually add properties to the request and don't includeid?id) and additional properties (everything notid)?Looking at the HTTPS request/response, this makes no sense because all properties are on the same JSON level and there is no distinction between standard and additional properties:
Coming from Active Directory, this behaviour is also unexpected, where the
-Propertiesattribute add the selected properties directly to the user object.Describe the solution you'd like.
A request
Get-MgGroupMember -GroupId "…" -Property "id","city"should return an object with a propertyidand another propertydepartment.Additional context?
No response