0

I need to use the SharePoint Rest API from a custom JavaScript application (outside from SharePoint).
How can I authenticate the user to use the Rest API.
I can not deploy a SharePoint app, I need those web services from my app.
I need to access to SharePoint on premise data.

4
  • I'm not convinced you can't use something like provider-hosted app. However if you want to hack around you could use a proxy. Commented Mar 6, 2015 at 8:29
  • So is there no way to call API from outside SharePoint? Commented Mar 6, 2015 at 8:30
  • None of the APIs will let you do CORS AFAIK, which makes me think of using a proxy. Why can't you just use the token you get from TokenHelper in a provider-hosted app and then just route all REST requests through your provider-hosted app? I would imagine you could just pass requests Commented Mar 6, 2015 at 8:37
  • This discussion would help you Update items using REST API from outside Commented Jun 14, 2016 at 6:28

1 Answer 1

0

It appears that such a scenario is now possible: https://msdn.microsoft.com/en-us/office/office365/howto/create-web-apps-using-CORS-to-access-files-in-Office-365

How to authenticate external app

Disclaimer: I have not tested this scenario yet..

2
  • This is quite nice. Does it only work with Azure AD? What about "plain" 365, and on-premise? Commented Mar 10, 2015 at 6:13
  • You will need Azure AD or ADFS (on-premise AD) to create OAuth tickets for authentication.. without this, it will not know how to issue tickets and coordinate authentication among different parties.. Commented Mar 11, 2015 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.