Microsoft Graph API returned response with duplicates data

Anonymous
2022-10-18T05:27:05.553+00:00

Hello Team,

We are using Graph API to search & sort all the Excel files from the user drive, (refer to API details screenshot). Although the API is working, we get duplicate data in the response, even though we set trimDuplicates property to true. As shown in the screenshot we get twice the data for the same excel file "Book-23.xlsx".

Please look into this & provide any solution.

Thanks & Regards,
Sahil Shikalgar

https://drive.google.com/file/d/1acMCEepIWtdEIwZZbTQjLS0CTCQJ71bd/view?usp=sharing
https://drive.google.com/file/d/1agG0aTie9hmrL6_IFhj9dXKtNbqC5Zjp/view?usp=sharing

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,364 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bhanu Kiran 3,526 Reputation points
    2022-10-21T06:23:39.037+00:00

    Hi @Anonymous ,

    Thanks for reaching out!

    Based on my understanding and post reviewing the description you shared, Graph API: GET search/query will return the duplicate file details from user’s drive when that particular file has been shared with other account.

    As per the documentation, The “trimDuplicates” property is only supported on files hosted in SharePoint.

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

    0 comments No comments