-
Notifications
You must be signed in to change notification settings - Fork 68
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
Can't create Group "A value is required for property 'displayName' of resource 'Group'." #188
Comments
Thanks for using the Ruby SDK and for reaching out. new_group = MicrosoftGraph::Models::Group.new()
new_group.display_name = 'My new Group'
new_group.mail_enabled = false
new_group.mail_nickname = 'newgroup'
new_group.security_enabled = true
new_group.group_types = ['Unified'] |
Hi, thanks for the quick answer. I tried that and got the same result. This is what my group object looks like before I try to post it, so it seems to have all the necessary attributes
Looking at the request that is being sent, it seems like the request body is missing |
That's a very good call-out. |
Thanks for the heads up, it seems I was on an older version. Unfortunately, I'm having some trouble getting all the dependencies to resolve correctly. At first I tried simply specifying the version in my Gemfile
but the same issue persisted. I presume this is because the request is made by
I tried to use the newest version of
But that seems to be impossible because of
|
Ok, let's unblock you with two pull requests.
After that gets published, I'll ask you to do the same here. |
Core release is out, please go ahead with the same for this repo. Please review the changes I've pushed to the changelog in the first pr and align with that. |
0.22.2 was just released which should fix your issue. Closing. |
Thanks for the help, I've updated to the 0.22.2 version and my Gemfile.lock looks like this now
So |
Thanks for your patience on the matter. I believe this issue is simply due to a dependencies mis-alignment.
I'm not sure how dependencies are managed in ruby (are they deduplicated like in dotnet/javascript/...? if so, what rationale is being applied? or are they isolated and multiple versions can be in the application context?) But getting clarity on the behaviour would be helpful. What would be interesting to do to rule this out would be to clone all the repositories, and link all packages locally
Can you try this approach locally and report on the result please? If that solves the issue, we'll bump all versions and dependencies gradually on all repository to ensure people get only the latest aligned versions with the fix. Another test worth performing would be to try get the serialized value (from the parse node) and see if the representation is what is expected before it's set on the request information's content. (see [this as an example]9https://github.com/microsoft/kiota-abstractions-ruby/blob/7367a156276923eddd22e52335adbba88b1bf71e/lib/microsoft_kiota_abstractions/request_information.rb#L96) you can just copy some of the code, pass the group object and checkout what will be in the resulting content, make sure you instantiate the client first to register the serialization providers) I hope this helps. Let me know if you have further questions. |
Hi, I'm trying to create a new group, I initialize a GraphServiceClient just like in the README
Then I try to build a Group object and POST it
I pieced this code together by using this doc https://learn.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0 as well as another user's code from this issue #163 (comment)
But I get an error back with the following message
A value is required for property 'displayName' of resource 'Group'.
What am I missing?
The text was updated successfully, but these errors were encountered: