Support @odata.bind in our models
Hello,
I think the SetOwners and SetMembers in Microsoft\Graph\Model\Group should have an array key with respectively [email protected] and [email protected] instead of members and owners in _propDict array , line 768 and 675, thx
AB#7588
Setting arbitrary properties key-value pairs is currently done when instantiating an object. We do need to be able to set arbitrary properties after instantiation. We should have a conversation about whether we should support odata.bind scenarios as first class properties on our models - either through generation or extension.
Changes should happen on base objects.
https://docs.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&tabs=http#example-2-create-a-group-with-owners-and-members
https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http
Version 2.0 of this SDK now supports @odata.bind using the additionalData property found in all models.
Please check out the relevant code samples in the docs: https://learn.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&tabs=php#example-2-create-a-group-with-owners-and-members
https://learn.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=php#example-2-add-multiple-members-to-a-group-in-a-single-request
For more on upgrading to v2.0, please see https://devblogs.microsoft.com/microsoft365dev/write-high-quality-code-with-the-microsoft-graph-php-sdk-v2/