Summary of document while searching

captain_atharv 391 Reputation points
2022-06-06T10:48:53.623+00:00

Hi,

I'm using https://learn.microsoft.com/en-us/graph/api/driveitem-search?view=graph-rest-1.0&tabs=http to search for documents in drive.
Microsoft Search API(search/query) returns summary of documents on search:
Eg:
{
"hitId": "xxxx",
"rank": 2,
"summary": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
"resource": "...."
...
}

Is there a way to get summary of documents in https://learn.microsoft.com/en-us/graph/api/driveitem-search?view=graph-rest-1.0&tabs=http as well?
PS. I cannot use Microsoft Search API as it only works for delegated access whereas I'm working on application context

Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
305 questions
Microsoft Graph Search API
Microsoft Graph Search API
A Microsoft API that searches for information in email messages, returns messages ranked by relevance, and renders a dedicated search experience.
159 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
6,060 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
594 questions
No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 14,386 Reputation points Microsoft Employee
    2022-06-07T07:55:52.963+00:00

    Hi @captain_atharv ,
    Per my research, I do agree with HarmeetSinghMSFT-7172's answer. There is no such method to get summary property by graph api. I feel regretful to inform you that it turns out to be a by-design one.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    No comments

1 additional answer

Sort by: Most helpful
  1. HarmeetSingh-MSFT 3,166 Reputation points Microsoft Employee
    2022-06-06T11:54:17.853+00:00

    Hi @captain_atharv

    Using ‘Search for DriveItems within a Drive’ Graph API to retrieve the driveItem search results, currently, we cannot get summary property in response. Please refer to this documentation to know more.

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".