Is it possible to use app-only policy in a SharePoint-Hosted App? All examples on Internet are using Provider-Hosted App which uses Managed code. I would like implement it in a SharePoint-hosted app using JavaScript. Appreciate all kind of advice.
1 Answer
No, you cannot use app-only policy in SharePoint hosted app. For a SP hosted app it is always app+user context. Refer MSDN documentation. The NOTE in the documentation reads
Apps that do not make OAuth authenticated calls (for example, apps that are only JavaScript running in the app web) cannot use the app-only policy