msgraph-sdk-ruby icon indicating copy to clipboard operation
msgraph-sdk-ruby copied to clipboard

undefined method `users_by_id' for #<MicrosoftGraph::GraphServiceClient

Open GarrisonD opened this issue 1 year ago • 1 comments

I installed the SDK with gem "microsoft_graph", "~> 0.22.2" and just ran the snippets from the README.md:

result = client.users_by_id("<user-id>").get.resume
undefined method `users_by_id' for #<MicrosoftGraph::GraphServiceClient

GarrisonD avatar Jun 19 '24 08:06 GarrisonD

Thanks for using the SDK and for reaching out. Have you tried ?

result = client.users.by_user_id("<user-id>").get.resume

baywet avatar Jun 19 '24 17:06 baywet

I think that this is in reference to the README.md suggesting that to retrieve a user by their ID you should use: result = client.users_by_id("<user-id>").get.resume which does not work as expected. Ref

rift137 avatar Nov 05 '24 00:11 rift137

@rift137 thanks for pointing this out. Is this something you'd like to submit a pull request for provided some guidance?

baywet avatar Nov 09 '24 07:11 baywet