user8608110
user8608110

Reputation: 211

Microsoft Graph Client SDK vs. Requesting JSONs

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?

Upvotes: 1

Views: 1095

Answers (2)

Laurie996
Laurie996

Reputation: 123

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.

Upvotes: 0

Dmitry Pimenov
Dmitry Pimenov

Reputation: 739

  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.

Upvotes: 1

Related Questions