I can't search for files in shapoint when using the api /v1.0/search/query

Bootcamp Full 0 Reputation points
2023-09-14T18:12:36.2+00:00

My file has been uploaded to share point and I use api to search for this file.

but doesn't return any results.

Screenshot 2023-09-15 011159

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | OneDrive | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-09-15T06:07:40.83+00:00

    Hi @ Bootcamp Full

    Judging from the question you provided, the cause of the problem is:

    There are spaces in the middle of your file name, and the spaces will be queried in chunks.

    Please enclose the file name "the a a" in double quotes to ensure that search engines see it as an exact matched phrase rather than a separate word. This will help you find files with exact file name matches.

    Here is a test for your reference:

    User's image

    Here is test result:

    User's image


    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.

    Best Regards

    Cheng Feng


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.