-
Notifications
You must be signed in to change notification settings - Fork 179
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
AdditionalProperties is confusing #3115
Comments
Hi @danielniccoli What you are experiencing is by design because of the SDK's code generator's (https://github.com/Azure/autorest.powershell) way of handling response entities defined in the OpenApi file. Attached is the image of the response entity defined in the open Api file used to generate the cmdlet in question. ![]() Based on the code generator's rules:
In summary, for the sdk to display any property, it should have a defined type. In case you need any further clarifications regarding the API path ( |
Why is |
@danielniccoli I unfortunately don't have visibility about API design decisions hence why I referred you to the graph support team here https://developer.microsoft.com/en-us/graph/support. Please raise the question there. |
I don't understand what the Graph support team has to do with that question. The sample response from the Graph API, which I included, does not make a distinction between |
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 keycity
, but propertyid
does not exist.Get-MgGroupMember -GroupId "…" -Property "id","city"
Returns and object with a property
id
and a dictionaryAdditionalProperties
with the keycity.
My question is:
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 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
-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 propertyid
and another propertydepartment
.Additional context?
No response
The text was updated successfully, but these errors were encountered: