Microsoft Graph Search API

Amit Paple 0 Reputation points

I'm using the below endpoint for searching files or folders present in my share point. This end point returns exact match. For Example if the file/folder name is NewCompany then if i pass query as NewCompany then only i will get the response correctly, but my requirement is even if i pass a query as company or new it should match the partially, and give the response. Is their any endpoint or do i need to alter the current end point so to achieve this ?{drive-id}/root/search(q='{search-text}')

Microsoft Graph Users API
Microsoft Graph Users API
A Microsoft API that allows you to build compelling app experiences based on users, their relationships with other users and groups, and the resources they access for example their mails, calendars, files, administrative roles, group memberships.
881 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.
199 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 28,691 Reputation points

    Hi @Amit Paple

    You can filter files/folders using the $filter query parameter.

    GET{drive id}/root/children?$filter=startswith(name,'xxx')

    User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.