0

I need to do searches within SharePoint Online document libraries either using the new Search API (https://learn.microsoft.com/en-us/graph/search-concept-overview) or using the _api/search endpoint.

I've reached a dead end using the _api/search endpoint as it seem it doesn't accept application token credentials even with certificate authentication. It ends up giving a {"error_description":"Unsupported security token."}

So, maybe the new Search API can be used to search elements within SharePoint Online document libraries from an external service.

However, the permission type Application is not supported as its said in the docs:

https://learn.microsoft.com/en-us/graph/api/search-query?view=graph-rest-beta&tabs=http

Any hints on this?

Thank you very much

Andres Biarge
  • 370
  • 4
  • 15
  • Yes, you cannot use the Application token for this API for now as its is not supported as mentioned in the [document](https://learn.microsoft.com/en-us/graph/api/search-query?view=graph-rest-beta&tabs=http#permissions). You can try [this API](https://learn.microsoft.com/en-us/graph/api/driveitem-search?view=graph-rest-1.0&tabs=http) as it supports application permissions as specified in the document. – Shiva Keshav Varma Sep 11 '20 at 09:37
  • but you cannot search based on SharePoint metadata, can you? – Andres Biarge Sep 11 '20 at 14:15
  • The above API which I mentioned mainly searches for the driveItem's fields including filename, metadata, and file content.:)- – Shiva Keshav Varma Sep 11 '20 at 14:51
  • But what about managed metadata, SharePoint columns and so on? – Andres Biarge Sep 12 '20 at 17:00

0 Answers0