Summary of document while searching

captain_atharv 511 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
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,571 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,610 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 31,071 Reputation points Microsoft Vendor
    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.


    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. HarmeetSingh7172 4,811 Reputation points
    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".

    1 person found this answer helpful.