2017-07-08 69 views

回答

1

您可以通過將QueryOptions的列表傳遞給Request方法來添加任何查詢參數。

List<QueryOption> options = new List<QueryOption> 
{ 
    new QueryOption("$search", "lunch") 
}; 
var messages = await client.Me.Messages.Request(options).GetAsync(); 

文檔:https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/docs/overview.md#custom-query-options

+0

謝謝你,我的文檔中尋找這個,但沒有找到它。 –

+0

還有一件事,當我用outlook郵件api指定的「subject:pizza」或「from:[email protected]」進行搜索時,我收到一個錯誤,指出「:」字符無效。 –

+0

只需在字符串本身中用雙引號括住搜索詞。我不得不用雙引號來避免雙引號。字符串術語=「\」主題:披薩\「」。 –

相關問題