Hi @Ankur
You can use Search API to search content stored in OneDrive or SharePoint
The Search API lets you scope the types of content to retrieve in OneDrive or SharePoint by specifying the entityTypes property on the searchRequest.
Please refer to the below sample request. Replace contoso with your file name which you want to search.
POST https://graph.microsoft.com/v1.0/search/query
Content-Type: application/json
{
"requests": [
{
"entityTypes": [
"driveItem"
],
"query": {
"queryString": "contoso"
}
}
]
}
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.