4

We recently discovered that Search API began to work with app only token. We know that this API was not working with app only tokens because it requires user context to run queries.

We would like to understand whether it is a temporary "bug" or it is a permanent change? How the API should behave? We currently see that it returns documents from all Sharepoint sites, will this change in the future?

2

This is not a temporary bug, MS has enabled support for App only token in Search Queries for SPO. This is a permanent change.

For OnPremise environment, its not supported yet, neither in 2013 nor in 2016.

API should behave as if it as Full tenant permissions i.e will behave as if its run by a tenant administrator. It will fetch all the documents inside the tenant.

Its not likely to change behaviour since you need tenant admin permission for it to run.

App-only and elevated privileges in the SharePoint add-in model

AllowAppOnlyPolicy does not work with Search - if target is SharePoint On-Premises. SharePoint Online support for it has been added.

Using add-in only / app-only permissions with search queries in SharePoint Online

2
  • It's great to know, thank you very much! I wonder if there is an official change log which mentions this improvement? – Vitalii Vokhmin Apr 11 '17 at 8:11
  • Both the links are MSDN links, so they are pretty much official. MS documentation is always a mess. Will update this answer if I find a better link :) – Gautam Sheth Apr 11 '17 at 8:21

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.