Microsoft Graph Client SDK vs. Requesting JSONs

风流意气都作罢 提交于 2019-12-24 20:21:32

问题


I know that the query: https://graph.microsoft.com/v1.0/me/messages Corresponds to: GraphClient.Me.Messages.Request().GetAsync()

I am trying to replicate the following requests in Microsoft Graph Client SDK :

  1. Get All Categories https://graph.microsoft.com/beta/me/outlook/masterCategories Corresponding Graph client query: ??

  2. Get All messages that contain certain words in their subject The link will be similar to this https://graph.microsoft.com/v1.0/me/messages?$search="hello world" Corresponding Graph Client : ??

  3. Update each of these messages with a category ?

The documentation only gives 2 examples, where could i find a list of examples/reading material on this?


回答1:


  1. The SDK is generated for the production endpoint (v1.0), so you will have to make a custom request for beta APIs

  2. List<QueryOption> options = new List<QueryOption> { new QueryOption("$search", "hello world") }; var filteredMessages = await graphClient.Me.Messages.Request(options).GetAsync();

  3. This also requires using custom requests since this is beta functionality.

We appreciate your feedback about our docs and how to use the SDK. We have some additional reference in the repo and are continuing to examine options for improving our SDK docs.




回答2:


Since I don't have enough reputation points, I had to post an answer instead of a comment. Thanks user8608110 for your help. Unfortunately, I can't use graph explorer because I'm not an admin. I think I have my patch request setup correctly, but I keep getting an "Empty Payload" error.

I thought stackoverflow was for us to help each other not delete the post of people trying to get help.



来源:https://stackoverflow.com/questions/49072912/microsoft-graph-client-sdk-vs-requesting-jsons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!