0

Using the Sharepoint REST API with a query similar to https://{tentant}.sharepoint.com/_api/v2.0/sites/{site-id}/drives/root/search(q='{text}') I can only get results from a single site/drive at a time. There is no way to directly filter by file type, modification date or any other property either.

Using Sharepoint's inbuilt search function https://{tenant}.sharepoint.com/_api/search/query?querytext='sharepoint' , when i search i am getting below response.

"{"error_description":"Invalid issuer or signature."}"

and the error message states: Method failed: (/_api/search/query) with code: 401 - Invalid username/password combo and Status code is 401

My oAuth credentials is fine and it is working for individual site/drive api but not global rest search.

Note: after looking out the documentation i found that i need to add full Sites.FullControl.All permission but nothing is helping for me.

  • I think sharepoint needs a user context to fire the search. Just the app will not suffice i guess, In your app you have to login the user not the App(id+secret) – joyBlanks Aug 24 '19 at 5:13
  • Want you mean with that ? Can you please elaborate – Abdul Azeez Aug 25 '19 at 4:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.