首页 文章

仅使用Microsoft Graph API按 Headers 搜索OneDrive文件

提问于
浏览
1

以下代码使用Microsoft Graph API搜索OneDrive .

List<DriveItem> items = graphServiceClient
    .getMe()
    .getDrive()
    .getRoot()
    .getSearch("abc")
    .buildRequest()
    .get().getCurrentPage();

此代码返回与 Headers 匹配的所有文件和文件夹(也可能是文档中的内容)“abc” .

如何限制搜索结果以仅获取与 Headers “abc”匹配的文件?

Edit

请在以下情况投票支持此功能请求

https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/16855591-microsoft-graph-api-search-onedrive-files-by-titl

1 回答

  • 2

    目前还没有't a way to restrict the search target to just the title at this point. At this time, you'll需要对结果进行客户端过滤 . 请在Office Developer Platform UserVoice页面打开功能请求 . 从这篇文章链接到它,以便其他人可以找到并投票 .

相关问题